Example #1
0
 public function init($poc)
 {
     $this->poc = $poc;
     $this->callbackHandler = new CallbackHandler($poc);
     $this->pocDispatcher = $poc->getPocDispatcher();
     $this->outputHandler->setCallbackHandler($this->callbackHandler);
     $this->outputHandler->setPoc($poc);
     $this->pocDispatcher->addListener(PocEventNames::GET_OUTPUT_FROM_CACHE, array($this, 'getOutputFromCache'));
     $this->pocDispatcher->addListener(PocEventNames::CAPTURE, array($this, 'capture'));
     $this->pocDispatcher->addListener(PocEventNames::FUNCTION_FETCHCACHE_BEGINNING, array($this, 'setObLevel'));
     $this->pocDispatcher->addListener(PocEventNames::MONITOR, array($this, 'monitor'));
     $this->pocDispatcher->addListener(PocEventNames::END_OF_BUFFERING, array($this, 'endOfBuffering'));
 }