/**
  * Creates an instance of BundleInstallUpdateEvent.
  *
  * @param  BundleInterface $target
  * @param  mixed           $eventArgs
  * @throws \InvalidArgumentException if the provided target does not implement BackBee\Bundle\BundleInterface
  */
 public function __construct($target, $eventArgs = null)
 {
     if (!$target instanceof BundleInterface) {
         throw new \InvalidArgumentException('Target of bundle update or action event must be instance of BackBee\\Bundle\\BundleInterface');
     }
     parent::__construct($target, $eventArgs);
     $this->bundle = $target;
     $this->forced = isset($eventArgs['force']) ? (bool) $eventArgs['force'] : false;
     $this->logs = isset($eventArgs['logs']) ? (array) $eventArgs['logs'] : [];
 }
Exemple #2
0
 /**
  * Create an instance of RendererEvent.
  *
  * @param mixed $target
  * @param mixed $arguments
  */
 public function __construct($target, $arguments = null)
 {
     parent::__construct($target, $arguments);
     $this->render = null;
     if (is_array($arguments)) {
         $this->renderer =& $arguments[0];
         $this->render =& $arguments[1];
     } else {
         $this->renderer =& $arguments;
     }
 }
Exemple #3
0
 /**
  * Create a new instance of PreRequestEvent.
  *
  * @param Request $request
  */
 public function __construct(Request $request)
 {
     parent::__construct($request);
 }
 /**
  * Create a new instance of PostResponseEvent.
  *
  * @param Response $response
  * @param Request  $request
  */
 public function __construct(Response $response, Request $request)
 {
     parent::__construct($response, $request);
     $this->request = $request;
 }