PHP Classes

File: classes/css-parser/filters/css-pseudo-first-child-filter.php

Recommend this page to a friend!
  Classes of Gonzalo Chumillas   PHP CSS Parser   classes/css-parser/filters/css-pseudo-first-child-filter.php   Download  
File: classes/css-parser/filters/css-pseudo-first-child-filter.php
Role: Class source
Content type: text/plain
Description: CSSPseudoFirstChild class
Class: PHP CSS Parser
Get HTML document nodes matching a CSS selector
Author: By
Last change: Merge branch 'master' of https://github.com/cequiel/cssparser
update
Date: 10 years ago
Size: 429 bytes
 

Contents

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

class
CSSPseudoFirstChildFilter extends CSSPseudoFilter {
   
   
/**
     * Does the node match?
     * @param DOMElement $node
     * @return boolean
     */
   
public function match($node) {
        return !
CSSHelper::getPreviousSiblingElement($node);
    }
}