PHP Classes

File: classes/css-parser/filters/css-id-filter.php

Recommend this page to a friend!
  Classes of Gonzalo Chumillas   PHP CSS Parser   classes/css-parser/filters/css-id-filter.php   Download  
File: classes/css-parser/filters/css-id-filter.php
Role: Class source
Content type: text/plain
Description: CSSIdFilter class
Class: PHP CSS Parser
Get HTML document nodes matching a CSS selector
Author: By
Last change: Merge branch 'master' of
Date: 9 years ago
Size: 518 bytes


Class file image Download
require_once dirname(dirname(__DIR__)) . "/css-parser/filters/css-filter.php";

CSSIdFilter extends CSSFilter {
     * Identifier.
     * @var string
private $id;
     * @param string $id
public function __construct($id) {
$this->id = $id;
     * Does the node match?
     * @param DOMElement $node
     * @return boolean
public function match($node) {
trim($node->getAttribute("id")) == $this->id;