Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fi1a/simplequery
PHP HTML DOM Parser управляемый CSS3 селекторами
https://github.com/fi1a/simplequery
dom dom-manipulation html parser php
Last synced: about 1 month ago
JSON representation
PHP HTML DOM Parser управляемый CSS3 селекторами
- Host: GitHub
- URL: https://github.com/fi1a/simplequery
- Owner: fi1a
- License: mit
- Created: 2020-08-22T10:12:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T01:18:29.000Z (almost 2 years ago)
- Last Synced: 2024-11-12T09:59:29.756Z (about 2 months ago)
- Topics: dom, dom-manipulation, html, parser, php
- Language: PHP
- Homepage:
- Size: 251 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP HTML DOM Parser управляемый CSS3 селекторами
[![Latest Version][badge-release]][packagist]
[![Software License][badge-license]][license]
[![PHP Version][badge-php]][php]
![Coverage Status][badge-coverage]
[![Total Downloads][badge-downloads]][downloads]
[![Support mail][badge-mail]][mail]Серверная, цепочная, управляемая селекторами CSS3 объектная модель документа (DOM), похожая на библиотеку jQuery.
Значительно упрощает такие вещи, как обход и манипуляции с HTML-документами.## Установка
Установить этот пакет можно как зависимость, используя Composer.
``` bash
composer require fi1a/simplequery
```## Краткий обзор
```php
use Fi1a\SimpleQuery\SimpleQuery;$sq = new SimpleQuery('
Title
');$sq('h1')->html('Updated title');
$sq('form')->append('Submit');$button = $sq('form > button');
$button->html(); // Submit
$button->hasClass('continue'); // trueecho (string) $sq;
```Результат вывода `echo (string) $sq;`:
```html
Updated title
Submit
```Подробная документация доступна в [wiki проекта](https://github.com/fi1a/simplequery/wiki).
[badge-release]: https://img.shields.io/packagist/v/fi1a/simplequery?label=release
[badge-license]: https://img.shields.io/github/license/fi1a/simplequery?style=flat-square
[badge-php]: https://img.shields.io/packagist/php-v/fi1a/simplequery?style=flat-square
[badge-coverage]: https://img.shields.io/badge/coverage-100%25-green
[badge-downloads]: https://img.shields.io/packagist/dt/fi1a/simplequery.svg?style=flat-square&colorB=mediumvioletred
[badge-mail]: https://img.shields.io/badge/mail-support%40fi1a.ru-brightgreen[packagist]: https://packagist.org/packages/fi1a/simplequery
[license]: https://github.com/fi1a/simplequery/blob/master/LICENSE
[php]: https://php.net
[downloads]: https://packagist.org/packages/fi1a/simplequery
[mail]: mailto:[email protected]