protected function parseDirectiveLine($line, \SplFileObject $file, $lineBreaks)
    {
        $directive = new Directive();

        $args = $this->directiveRegex($line);
        $name = array_shift($args);

        if ($name === null) {
            $lineNum = $file->key();
            throw new SyntaxException($lineNum, $line, "Could not parse the name of the directive");
        }

        $directive->setName($name)
                  ->setArguments($args)
                  ->setLineBreaks($lineBreaks);

        return $directive;
    }
protected function parseDirectiveLine($line, \SplFileObject $file, $lineBreaks)
    {
        $directive = new Directive();

        $args = $this->directiveRegex($line);
        $name = array_shift($args);

        if ($name === null) {
            $lineNum = $file->key();
            throw new SyntaxException($lineNum, $line, "Could not parse the name of the directive");
        }

        $directive->setName($name)
                  ->setArguments($args)
                  ->setLineBreaks($lineBreaks);

        return $directive;
    }
protected function parseDirectiveLine ( $ line , \ SplFileObject $ file , $ lineBreaks ) { $ directive = new Directive ( ) ; $ args = $ this -> directiveRegex ( $ line ) ; $ name = array_shift ( $ args ) ; if ( $ name === null ) { $ lineNum = $ file -> key ( ) ; throw new SyntaxException ( $ lineNum , $ line , "Could not parse the name of the directive" ) ; } $ directive -> setName ( $ name ) -> setArguments ( $ args ) -> setLineBreaks ( $ lineBreaks ) ; return $ directive ; }
Parse a Directive Line

@param string $line
@param \SplFileObject $file
@return Directive
@throws SyntaxException
Parse a Directive Line