__construct() public method

public __construct ( $line )
Exemplo n.º 1
0
 public function __construct($line, $compiler)
 {
     parent::__construct($line);
     $this->_phpVariable = false;
     $this->_el = new Element($this->getHaml(), $compiler);
     $this->_phpVariable = $this->_el->isPhpVariable();
 }
Exemplo n.º 2
0
 public function __construct($line)
 {
     parent::__construct($line);
     $parts = explode(' ', trim($line));
     $this->_type = isset($parts[1]) ? strtolower($parts[1]) : '';
     if ('xml' == $this->_type && isset($parts[2])) {
         $this->_encoding = $parts[2];
     }
 }
Exemplo n.º 3
0
 public function __construct($line)
 {
     parent::__construct($line);
     $this->_line = $line;
     if (!preg_match(TagNode::CODE_PATTERN, $this->_line, $matches)) {
         throw new InvalidTagException('Line does not match the pattern');
     }
     $this->_mode = $matches['mode'];
     $this->_code = $matches['code'];
     if (isset($matches['tag'])) {
         $tag = trim($matches['tag']);
         if (isset($this->_tags[$tag])) {
             $this->_isTag = true;
             $this->_tag = $tag;
             if (!isset($matches['colon'])) {
                 $this->_code .= ':';
             }
         }
     }
     if ($this->_isTag && TagNode::LOUD_MODE == $this->_mode) {
         throw new InvalidTagException('Loud mode is not allowed for the tags ' . join(', ', array_keys($this->_tags)) . '. Use silent mode (-).');
     }
 }
Exemplo n.º 4
0
 public function __construct($line, FilterContainer $container = null)
 {
     parent::__construct($line);
     $this->_filterContainer = $container;
 }
Exemplo n.º 5
0
 public function __construct($line)
 {
     parent::__construct($line);
     $this->identifyCommentType();
 }