PHP Classes

File: classes/css/parser/filter/css-parser-filter-pseudo-last.php

Recommend this page to a friend!
  Classes of Gonzalo Chumillas   PHP Query   classes/css/parser/filter/css-parser-filter-pseudo-last.php   Download  
File: classes/css/parser/filter/css-parser-filter-pseudo-last.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Query
Parse and access XML documents as arrays
Author: By
Last change: update
Date: 9 years ago
Size: 1,291 bytes
 

Contents

Class file image Download
<?php
/**
 * This file contains the CssParserFilterPseudoLast class.
 *
 * PHP Version 5.3
 *
 * @category Css
 * @package CssParser
 * @author Gonzalo Chumillas <gonzalo@soloproyectos.com>
 * @license https://raw2.github.com/soloproyectos/php.common-libs/master/LICENSE BSD 2-Clause License
 * @link https://github.com/soloproyectos/php.common-libs
 */
namespace com\soloproyectos\common\css\parser\filter;
use \
DOMElement;
use
com\soloproyectos\common\css\parser\filter\CssParserFilterPseudo;

/**
 * Class CssParserFilterPseudoLast.
 *
 * This class represents the first-child pseudo filter.
 *
 * @category Css
 * @package CssParser
 * @author Gonzalo Chumillas <gonzalo@soloproyectos.com>
 * @license https://raw2.github.com/soloproyectos/php.common-libs/master/LICENSE BSD 2-Clause License
 * @link https://github.com/soloproyectos/php.common-libs
 */
class CssParserFilterPseudoLast extends CssParserFilterPseudo
{
   
/**
     * Does the node match?
     *
     * @param DOMElement $node DOMElement object
     * @param integer $position Node position
     * @param array $items List of nodes
     *
     * @return boolean
     */
   
public function match($node, $position, $items)
    {
        return
$position == (count($items) - 1);
    }
}