src/Directive/BlockDirective.php
public function hasDirective($name)
    {
        $inSubDirective = false;

        foreach ($this->directives as $directive) {
            if ($directive->getName() == $name) {
                return true;
            }

            $inSubDirective = $this->hasInnerDirective($name, $inSubDirective, $directive);
        }

        return $inSubDirective;
    }
public function hasDirective($name)
    {
        $inSubDirective = false;

        foreach ($this->directives as $directive) {
            if ($directive->getName() == $name) {
                return true;
            }

            $inSubDirective = $this->hasInnerDirective($name, $inSubDirective, $directive);
        }

        return $inSubDirective;
    }
public function hasDirective ( $ name ) { $ inSubDirective = false ; foreach ( $ this -> directives as $ directive ) { if ( $ directive -> getName ( ) == $ name ) { return true ; } $ inSubDirective = $ this -> hasInnerDirective ( $ name , $ inSubDirective , $ directive ) ; } return $ inSubDirective ; }
Confirms if the directive contains a specified directive.

@param string $name the directive for which to check existence

@return bool true if the sub-directive exists, false otherwise
Confirms if the directive contains a specified directive .