承接 innmind/html 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innmind/html

最新稳定版本:8.0.0

Composer 安装命令:

composer require innmind/html

包简介

Library to abstract html manipulation

关键字:

README 文档

README

Build Status codecov Type Coverage

This library is an extension of innmind/xml to support working properly with html as a node tree.

Important: you must use vimeo/psalm to make sure you use this library correctly.

Installation

composer require innmind/html

Usage

use Innmind\Html\{
    Reader,
    Document,
};
use Innmind\Xml\{
    Node,
    Element,
    Element\Custom,
};
use Innmind\Filesystem\File\Content;
use Innmind\Immutable\Maybe;

$read = Reader::new();

$html = $read(
    Content::ofString(\file_get_contents('https://github.com/')),
); // Maybe<Document|Element|Custom|Node>

Extract some elements of the tree

This library provides some visitors to extract elements out of the dom tree, the example below show you how to extract all the h1 elements of a tree:

use Innmind\Html\Visitor\Elements;

$h1s = Elements::of('h1')($html);

Here $h1s is a sequence of Element which are all h1 elements.

Here's the full list of visitors you have access to:

统计信息

  • 总下载量: 15.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固