name = false; $this->parameterEvaluation = self::EVAL_PREPROCESS; $this->parameters = array(); } public function getTreeProperties() { return array( 'name' => $this->name, 'evaluation' => $this->parameterEvaluation, 'parameters' => $this->parameters ); } /** * Prepends the element $element as a parameter to the current operator. * @param ezcTemplateTstNode */ public function prependParameter( $element ) { $this->parameters = array_merge( array( $element ), $this->parameters ); } /** * Appends the element $element as a parameter to the current operator. * @param ezcTemplateTstNode */ public function appendParameter( $element ) { $this->parameters[] = $element; } /** * Returns the last parameter (if set) object of the current operator. * @return ezcTemplateTstNode */ public function getLastParameter() { if ( count( $this->parameters ) > 0 ) return $this->parameters[count( $this->parameters ) - 1]; return null; } /** * Returns the number of parameters the operator has. * @return int */ public function getParameterCount() { return count( $this->parameters ); } /** * Overwrites the last parameter for the current operator to point to $element. * If there are no parameters it is simply appended to the list. */ public function setLastParameter( ezcTemplateTstNode $parameter ) { if ( count( $this->parameters ) > 0 ) $this->parameters[count( $this->parameters ) - 1] = $parameter; else $this->parameters[] = $parameter; } /** * Removes the last parameter from the parameter list. */ public function removeLastParameter() { if ( count( $this->parameters ) > 0 ) unset( $this->parameters[count( $this->parameters ) - 1] ); } } ?>