/** * Initialize with function name code and optional arguments * * @param ezcTemplateConditionBodyAstNode $conditionBody */ public function __construct(ezcTemplateConditionBodyAstNode $conditionBody = null) { parent::__construct(); if ($conditionBody !== null) { $this->conditions[] = $conditionBody; } }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateAstNode $initial * @param ezcTemplateAstNode $condition * @param ezcTemplateAstNode $iteration * @param ezcTemplateBodyAstNode $body */ public function __construct(ezcTemplateAstNode $initial = null, ezcTemplateAstNode $condition = null, ezcTemplateAstNode $iteration = null, ezcTemplateBodyAstNode $body = null) { parent::__construct(); $this->initial = $initial; $this->condition = $condition; $this->iteration = $iteration; $this->body = $body; }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateAstNode $array * @param ezcTemplateVariableAstNode $key * @param ezcTemplateVariableAstNode $value * @param ezcTemplateBodyAstNode $body */ public function __construct(ezcTemplateAstNode $array = null, ezcTemplateVariableAstNode $key = null, ezcTemplateVariableAstNode $value = null, ezcTemplateBodyAstNode $body = null) { parent::__construct(); $this->arrayExpression = $array; $this->keyVariable = $key; $this->valueVariable = $value; $this->body = $body; }
/** * Constructs a new ezcTemplateBlockCommentAstNode * * @param string $text Text for comment. * @param bool $hasSeparator Use spacing separator or not? */ public function __construct($text, $hasSeparator = true) { parent::__construct(); if (!is_string($text)) { throw new ezcBaseValueException("text", $text, 'string'); } $this->text = $text; $this->hasSeparator = $hasSeparator; }
/** * Initialize with function name code and optional arguments * * @param string $className * @param ezcTemplateVariableAstNode $var * @param ezcTemplateBodyAstNode $body */ public function __construct($className, ezcTemplateVariableAstNode $var, ezcTemplateBodyAstNode $body = null) { parent::__construct(); if (!is_string($className)) { throw new ezcBaseValueException("className", $className, 'string'); } $this->className = $className; $this->variableExpression = $var; $this->body = $body; }
/** * Constructs a new ezcTemplateEolCommentAstNode * * @param string $text Text for comment. * @param bool $hasSeparator Use spacing separator or not? * @param int $type Type of EOL comment, see {@link self::$type}. */ public function __construct($text, $hasSeparator = true, $type = ezcTemplateEolCommentAstNode::MARKER_DOUBLE_SLASH) { parent::__construct(); if (!is_string($text)) { throw new ezcBaseValueException("text", $text, 'string'); } $this->text = $text; $this->type = $type; $this->hasSeparator = $hasSeparator; }
/** * Constructs a new ezcTemplateEchoAstNode * * @param array(ezcTemplateAstNode) $outputList */ public function __construct(array $outputList = null) { parent::__construct(); $this->outputList = array(); if ($outputList !== null) { foreach ($outputList as $output) { $this->appendOutput($output); } } }
/** * Initialize with function name code and optional arguments * * @param array(ezcTemplateAstNode) $expressions */ public function __construct(array $expressions = null) { parent::__construct(); $this->expressions = array(); if ($expressions !== null) { foreach ($expressions as $id => $expression) { if (!$expression instanceof ezcTemplateAstNode) { throw new ezcBaseValueException("expressions[{$id}]", $expression, 'ezcTemplateAstNode'); } $this->expressions[] = $expression; } } }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateBodyAstNode $body * @param array(ezcTemplateCatchAstNode) $catches */ public function __construct(ezcTemplateBodyAstNode $body = null, array $catches = null) { parent::__construct(); $this->body = $body; $this->catches = array(); if ($catches !== null) { foreach ($catches as $id => $catch) { if (!$catch instanceof ezcTemplateCatchAstNode) { throw new ezcBaseValueException("catches[{$id}]", $catch, 'ezcTemplateCatchAstNode'); } $this->catches[] = $catch; } } }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateAstNode $expression * @param array(ezcTemplateAstNode) $cases Should be either ezcTemplateCaseAstNode or ezcTemplateDefaultAstNode. */ public function __construct(ezcTemplateAstNode $expression = null, array $cases = null) { parent::__construct(); $this->expression = $expression; $this->cases = array(); $this->hasDefaultCase = false; if ($cases !== null) { $hasDefault = false; foreach ($cases as $case) { if (!$case instanceof ezcTemplateCaseAstNode) { throw new ezcTemplateInternalException("Array in case list \$cases must consist of object which are instances of ezcTemplateCaseAstNode, not <" . get_class($case) . ">."); } if ($case instanceof ezcTemplateDefaultAstNode) { if ($hasDefault) { throw new ezcTemplateInternalException("The default case is already present as a case entry."); } $hasDefault = true; } $this->cases[] = $case; } $this->hasDefaultCase = $hasDefault; } }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateBodyAstNode $body */ public function __construct(ezcTemplateBodyAstNode $body = null) { ezcTemplateStatementAstNode::__construct(); $this->body = $body; }
/** * Constructs a new php code node. * * @param string $code */ public function __construct($code = null) { parent::__construct(); $this->code = $code; }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateAstNode $expression * @param bool $terminateStatement */ public function __construct(ezcTemplateAstNode $expression = null, $terminateStatement = true) { parent::__construct(); $this->expression = $expression; $this->terminateStatement = $terminateStatement; }
/** * Constructs a new exception. * * @param string $message The value of PHP type to be stored in code element. */ public function __construct($message) { parent::__construct(); $this->message = $message; }
/** * Constructs a new NOP instruction. */ public function __construct() { parent::__construct(); }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateAstNode $expression */ public function __construct(ezcTemplateAstNode $expression = null) { parent::__construct(); $this->expression = $expression; }
/** * Initialize with function name code and optional arguments * * @param ezcTemplateBodyAstNode $body */ public function __construct(ezcTemplateBodyAstNode $body = null) { parent::__construct(); $this->body = $body; }
/** * Constructs a new ezcTemplateCloneAstNode * * @param ezcTemplateAstNode $object */ public function __construct($object = null) { parent::__construct(); $this->object = $object; }