예제 #1
0
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->startBracket = '{';
     $this->endBracket = '}';
     $this->block = null;
 }
예제 #2
0
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->currentOperator = null;
     $this->rootOperator = null;
     $this->minPrecedence = false;
 }
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->block = null;
 }
예제 #4
0
파일: variable.php 프로젝트: bmdevel/ezc
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->variable = null;
     $this->variableName = null;
 }
예제 #5
0
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
 }
 /**
  * Parses a required type.
  *
  * @param mixed $type
  * @param ezcTemplateCursor $startCursor
  * @param bool $mergeElements
  * @return bool
  */
 protected function parseRequiredType($type, ezcTemplateCursor $startCursor = null, $mergeElements = true)
 {
     if (is_string($type)) {
         $className = 'ezcTemplate' . $type . 'SourceToTstParser';
         if (!ezcBaseFeatures::classExists($className)) {
             throw new ezcTemplateInternalException("Could instantiate sub-parser for type <{$type}>, the class <{$className}> does not exist");
         }
         $this->subParser = new $className($this->parser, $this, $startCursor);
     } else {
         if (is_object($type) && $type instanceof ezcTemplateSourceToTstParser) {
             $this->subParser = $type;
         } else {
             throw new ezcTemplateInternalException("Cannot use <" . gettype($type) . "> as parser in ezcTemplateSourceToTstParser::parseRequiredType()");
         }
     }
     $this->lastParser = $this->subParser;
     $this->subParser->parse();
     if ($this->subParser->status == self::PARSE_SUCCESS) {
         $this->currentCursor->copy($this->subParser->endCursor);
         $this->lastCursor->copy($this->currentCursor);
         if ($mergeElements) {
             $this->mergeElements($this->subParser);
         }
         $this->subParser = null;
         return true;
     } elseif ($this->subParser->status === self::PARSE_PARTIAL_SUCCESS) {
         $this->status = $this->subParser->status;
         return false;
     }
     return false;
 }
예제 #7
0
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->value = null;
     $this->element = null;
 }
예제 #8
0
 /**
  * Passes control to parent.
  *
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, $parentParser, $startCursor)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->readingParameter = false;
 }
예제 #9
0
 /**
  * Passes control to parent.
  * 
  * @param ezcTemplateParser $parser
  * @param ezcTemplateSourceToTstParser $parentParser
  * @param ezcTemplateCursor $startCursor
  */
 function __construct(ezcTemplateParser $parser, ezcTemplateSourceToTstParser $parentParser, ezcTemplateCursor $startCursor = null)
 {
     parent::__construct($parser, $parentParser, $startCursor);
     $this->block = null;
 }