original_string: public function subscribe($eventType, $callback)
      {
          $callback = $this->makeEventCallback($callback);
          if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) {
              $this->eventList[$eventType] = [];
          }
          array_push($this->eventList[$eventType], $callback);
          return $callback['id'];
      }
code: public function subscribe($eventType, $callback)
      {
          $callback = $this->makeEventCallback($callback);
          if (!isset($this->eventList[$eventType]) || !is_array($this->eventList[$eventType])) {
              $this->eventList[$eventType] = [];
          }
          array_push($this->eventList[$eventType], $callback);
          return $callback['id'];
      }
code_tokens: public function subscribe ( $ eventType , $ callback ) { $ callback = $ this -> makeEventCallback ( $ callback ) ; if ( ! isset ( $ this -> eventList [ $ eventType ] ) || ! is_array ( $ this -> eventList [ $ eventType ] ) ) { $ this -> eventList [ $ eventType ] = [ ] ; } array_push ( $ this -> eventList [ $ eventType ] , $ callback ) ; return $ callback [ 'id' ] ; }
docstring: Add a callback on a specific backend event.
  @param string $eventType - Use constants(add your own if needed)
  @param callable $callback - Execution callback.
  @return string|null
docstring_tokens: Add a callback on a specific backend event .