public function addDirective(Directive $directive)
    {
        if ($directive->getParentScope() !== $this) {
            $directive->setParentScope($this);
        }

        $this->directives[] = $directive;
        $this->addPrintable($directive);

        return $this;
    }
public function addDirective(Directive $directive)
    {
        if ($directive->getParentScope() !== $this) {
            $directive->setParentScope($this);
        }

        $this->directives[] = $directive;
        $this->addPrintable($directive);

        return $this;
    }
public function addDirective ( Directive $ directive ) { if ( $ directive -> getParentScope ( ) !== $ this ) { $ directive -> setParentScope ( $ this ) ; } $ this -> directives [ ] = $ directive ; $ this -> addPrintable ( $ directive ) ; return $ this ; }
Add a Directive to the list of this Scopes directives

Adds the Directive and sets the Directives parent Scope to $this.

@param Directive $directive
@return $this
Add a Directive to the list of this Scopes directives