conditions[] = $conditionBody; } } /** * Appends the condition object to the current list of conditions. * * @param ezcTemplateConditionBodyAstNode $condition Append an extra condition block. */ public function appendCondition( ezcTemplateConditionBodyAstNode $condition ) { $this->conditions[] = $condition; } /** * Returns the last condition object from the body. * If there are no conditions in the body it returns null. * * @return ezcTemplateConditionBodyAstNode */ public function getLastCondition() { $count = count( $this->conditions ); if ( $count === 0 ) { return null; } return $this->conditions[$count - 1]; } } ?>