original_string: public function trigger($eventName)
      {
          $data = func_get_args();
          array_shift($data);
          $event = $this->_prepareEvent($eventName, $data);
          $this->_log($event->name());
          $this->_eventManager->dispatch($event);
  
          return $event;
      }
code: public function trigger($eventName)
      {
          $data = func_get_args();
          array_shift($data);
          $event = $this->_prepareEvent($eventName, $data);
          $this->_log($event->name());
          $this->_eventManager->dispatch($event);
  
          return $event;
      }
code_tokens: public function trigger ( $ eventName ) { $ data = func_get_args ( ) ; array_shift ( $ data ) ; $ event = $ this -> _prepareEvent ( $ eventName , $ data ) ; $ this -> _log ( $ event -> name ( ) ) ; $ this -> _eventManager -> dispatch ( $ event ) ; return $ event ; }
docstring: Trigger the given event name.
  
  ### Usage:
  
  ```php
  EventDispatcher::instance()->trigger('GetTime', $arg0, $arg1, ..., $argn);
  ```
  
  Your Event Listener must implement:
  
  ```php
  public function implementedEvents()
  {
  return ['GetTime' => 'handlerForGetTime'];
  }
  
  public function handlerForGetTime(Event $event, $arg0, $arg1, ..., $argn)
  {
  // logic
  }
  ```
  
  You can provide a subject to use by passing an array as first arguments where
  the first element is the event name and the second one is the subject:
  
  ```php
  EventDispatcher::instance()
  ->trigger(['GetTime', new MySubject()], $arg0, $arg1, ..., $argn);
  ```
  
  If no subject is given an instance of "EventDispatcher" class will be used by
  default.
  
  @param array|string $eventName The event name to trigger
  @return \Cake\Event\Event The event object that was triggered
docstring_tokens: Trigger the given event name .