Example #1
0
 /**
  * Raises an event if an event with it's type was not yet raised.
  *
  * @param string $eventType   The event type
  *
  * @return void
  */
 protected function raiseEventIfNotRaisedYet($eventType)
 {
     $eventHandlerRegistry = $this->diContainer->getEventHandlerRegistry();
     if (is_null($eventHandlerRegistry->getLastTimeForEventType($eventType))) {
         $eventHandlerRegistry->raise(new Event($eventType));
     }
 }
 public function testConstructor()
 {
     $sc = new SystemContainer();
     $this->assertInstanceOf('\\YapepBase\\ErrorHandler\\ErrorHandlerRegistry', $sc->getErrorHandlerRegistry());
     $this->assertInstanceOf('\\YapepBase\\Log\\Message\\ErrorMessage', $sc->getErrorLogMessage());
     $this->assertInstanceOf('\\YapepBase\\Event\\EventHandlerRegistry', $sc->getEventHandlerRegistry());
     $this->assertInstanceOf('\\YapepBase\\Session\\SessionRegistry', $sc->getSessionRegistry());
 }