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;
    }