public function consult(BaseEvent $event) { $sentinelCnt = $this->getSentinel(); $this->setSentinel($sentinelCnt + 1); if ($sentinelCnt) { $this->eventDispatcher->dispatch(ROIProtectorEventNames::CONSULT_STARTED, new ROIEvent($this)); if ($sentinelCnt >= 1 and $sentinelCnt <= 2) { while ($this->getSentinel()) { // $this->monoLogger->setLog(self::LOG_TYPE_CIA, // "Sleep: $sentinelCnt"); usleep(500000); } echo $this->poc->fetchCache(); } if ($sentinelCnt >= $this->maxNumberOfConcurrentConnections) { $this->outputHandler->ObPrintCallback($this->getRefreshPage()); $this->outputHandler->stopBuffer(); } } // $this->monoLogger->setLog(self::LOG_TYPE_CIA, "end: $sentinelCnt"); }
public function getOutputFromCache(BaseEvent $event) { $this->outputHandler->startBuffer(CallbackHandler::CALLBACK_CACHE); $this->callbackHandler->getHeaderManipulator()->fetchHeaders(); $this->outputHandler->stopBuffer($this->poc->getOutput()); }