Exemple #1
0
 public function listenerCallback(ChangeSetEvent $event)
 {
     if ($this->callbackCount == 2) {
         touch($file = self::$tmpDir . '/foo.txt');
         file_put_contents($file, 'Hello World');
         $event->getListener()->stop();
         return;
     }
     $this->isCallbackCalled = true;
     $this->callbackCount++;
 }
Exemple #2
0
 /**
  * @return \PhpGuard\Listen\Listener
  */
 public function getListener()
 {
     return $this->changeSet->getListener();
 }