protected function initDirective($line)
    {
        if (preg_match('/^\.\. (\|(.+)\| |)([^\s]+)::( (.*)|)$/mUsi', $line, $match)) {
            $this->directive = array(
                'variable' => $match[2],
                'name' => $match[3],
                'data' => trim($match[4]),
                'options' => array()
            );

            return true;
        }

        return false;
    }
protected function initDirective($line)
    {
        if (preg_match('/^\.\. (\|(.+)\| |)([^\s]+)::( (.*)|)$/mUsi', $line, $match)) {
            $this->directive = array(
                'variable' => $match[2],
                'name' => $match[3],
                'data' => trim($match[4]),
                'options' => array()
            );

            return true;
        }

        return false;
    }
protected function initDirective ( $ line ) { if ( preg_match ( '/^\.\. (\|(.+)\| |)([^\s]+)::( (.*)|)$/mUsi' , $ line , $ match ) ) { $ this -> directive = array ( 'variable' => $ match [ 2 ] , 'name' => $ match [ 3 ] , 'data' => trim ( $ match [ 4 ] ) , 'options' => array ( ) ) ; return true ; } return false ; }
Get current directive if the buffer contains one

.. |variable| name:: data
:option: value
:otherOption: otherValue

@param string $line
@return false if this is not a directive, else an array containing :
- variable: the variable name of the directive
- name: the directive name
- data: the data of the directive
- options: an array of all the options and their values
Get current directive if the buffer contains one