Esempio n. 1
0
 /**
  * Constructs a 'new' class element.
  *
  * @param string $class 
  * @param array(ezcTemplateAstNode) $functionArguments
  */
 public function __construct($class = null, array $functionArguments = null)
 {
     parent::__construct();
     $this->class = $class;
     if ($functionArguments !== null) {
         foreach ($functionArguments as $argument) {
             $this->appendParameter($argument);
         }
     }
 }
Esempio n. 2
0
 /**
  * Initialize with function name code and optional arguments
  *
  * @param string $name
  * @param array(ezcTemplateAstNode) $functionArguments
  */
 public function __construct($name, array $functionArguments = null)
 {
     parent::__construct(1, false);
     $this->name = $name;
     $this->typeHint = self::TYPE_ARRAY | self::TYPE_VALUE;
     if ($functionArguments !== null) {
         foreach ($functionArguments as $argument) {
             $this->appendParameter($argument);
         }
     }
 }
Esempio n. 3
0
 /**
  * Constructs a new ezcTemplateOperatorAstNode
  *  
  * @param int $parameterCount The number of parameters the operator must have.
  * @param bool $preOperator Controls whether unary operators are placed before or after operand.
  */
 public function __construct($parameterCount, $preOperator = false)
 {
     parent::__construct($parameterCount, $parameterCount);
     $this->preOperator = $preOperator;
 }
Esempio n. 4
0
 /**
  * Initialize dynamic string with parameter constraints.
  */
 public function __construct()
 {
     parent::__construct(0, false);
 }