Exemple #1
0
 /**
  * Constructor
  *
  * @param string $markup
  * @param array $tokens
  * @param LiquidFileSystem $file_system
  * @return CaseLiquidTag
  */
 function CaseLiquidTag($markup, &$tokens, &$file_system)
 {
     $this->nodelists = array();
     $this->else_nodelist = array();
     parent::LiquidTag($markup, $tokens, $file_system);
     $syntax_regexp = new LiquidRegexp('/' . LIQUID_QUOTED_FRAGMENT . '/');
     if ($syntax_regexp->match($markup, $matches)) {
         $this->left = $syntax_regexp->matches[0];
     } else {
         trigger_error("Syntax Error in tag 'case' - Valid syntax: case [condition]", E_USER_ERROR);
     }
 }