本文整理汇总了PHP中ezcTemplateStatementAstNode类的典型用法代码示例。如果您正苦于以下问题:PHP ezcTemplateStatementAstNode类的具体用法?PHP ezcTemplateStatementAstNode怎么用?PHP ezcTemplateStatementAstNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ezcTemplateStatementAstNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initialize with function name code and optional arguments
*
* @param ezcTemplateBodyAstNode $body
*/
public function __construct(ezcTemplateBodyAstNode $body = null)
{
ezcTemplateStatementAstNode::__construct();
$this->body = $body;
}
示例2: __construct
/**
* 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;
}
}
示例3: __construct
/**
* 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;
}
示例4: __construct
/**
* 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;
}
示例5: __construct
/**
* 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;
}
示例6: __construct
/**
* 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;
}
示例7: __construct
/**
* 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;
}
示例8: __construct
/**
* 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);
}
}
}
示例9: __construct
/**
* 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;
}
}
}
示例10: __construct
/**
* 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;
}
}
}
示例11: __construct
/**
* 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;
}
}
示例12: __construct
/**
* Constructs a new php code node.
*
* @param string $code
*/
public function __construct($code = null)
{
parent::__construct();
$this->code = $code;
}
示例13: __construct
/**
* 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;
}
示例14: __construct
/**
* 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;
}
示例15: __construct
/**
* Constructs a new NOP instruction.
*/
public function __construct()
{
parent::__construct();
}