コード例 #1
0
ファイル: Phase.php プロジェクト: robo47/BlazeFramework
 /**
  * @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;
         }
     }
 }
コード例 #2
0
 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);
     }
 }