/** * @param context the FacesContext for the current request * @return <code>true</code> if <code>FacesContext.responseComplete()</code> * or <code>FacesContext.renderResponse()</code> and the phase is not * RENDER_RESPONSE, otherwise return <code>false</code> * * @return boolean */ private function shouldSkip(BlazeContext $context) { if ($context->getResponseComplete()) { return true; } else { if ($context->getDoRenderResponse() && \blaze\web\event\PhaseId::RENDER_RESPONSE != $this->getId()) { return true; } else { return false; } } }
public function execute(BlazeContext $context) { for ($i = 0; $i < $this->phases->count() - 1; $i++) { if ($context->getDoRenderResponse() || $context->getResponseComplete()) { break; } // PhaseListener are executed in the doPhase() $this->phases->get($i)->doPhase($context, $this, $this->phaseListener); } }