Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 селекторами

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'); // true

echo (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]