/** * Returns the current object * Allows for conditional statements in a fluid interface. * * @return Criteria * * @throws PropelException */ public function _endif() { if (!$this->conditionalProxy) { throw new PropelException('_endif() must be called after _if()'); } $this->conditionalProxy = $this->conditionalProxy->getParentProxy(); if ($this->conditionalProxy) { return $this->conditionalProxy->getCriteriaOrProxy(); } // reached last level return $this; }