original_string: public function register()
      {
          $this->helper_callbacks = array();
          $arguments= func_get_args();
          if(count($arguments) > 0){
              foreach($arguments as $argument){
                  if($argument instanceof Plugin){ //this is a plugin object
                      $callback = $argument->getEventHelperCallback($this->getName());
                      if(is_callable($callback)){
                          $this->helper_callbacks[] = $callback;
                      }                 
                  }
                  else if(is_callable($argument)){ //this is a closure
                      $this->helper_callbacks[] = $argument;
                  }
              }
          }
  
          return $this; //return the event object reference to allow chainable calls
      }
code: public function register()
      {
          $this->helper_callbacks = array();
          $arguments= func_get_args();
          if(count($arguments) > 0){
              foreach($arguments as $argument){
                  if($argument instanceof Plugin){ //this is a plugin object
                      $callback = $argument->getEventHelperCallback($this->getName());
                      if(is_callable($callback)){
                          $this->helper_callbacks[] = $callback;
                      }                 
                  }
                  else if(is_callable($argument)){ //this is a closure
                      $this->helper_callbacks[] = $argument;
                  }
              }
          }
  
          return $this; //return the event object reference to allow chainable calls
      }
code_tokens: public function register ( ) { $ this -> helper_callbacks = array ( ) ; $ arguments = func_get_args ( ) ; if ( count ( $ arguments ) > 0 ) { foreach ( $ arguments as $ argument ) { if ( $ argument instanceof Plugin ) { //this is a plugin object $ callback = $ argument -> getEventHelperCallback ( $ this -> getName ( ) ) ; if ( is_callable ( $ callback ) ) { $ this -> helper_callbacks [ ] = $ callback ; } } else if ( is_callable ( $ argument ) ) { //this is a closure $ this -> helper_callbacks [ ] = $ argument ; } } } return $ this ; //return the event object reference to allow chainable calls }
docstring: register an array of plugins objects and allow the plugins to join the process of handling this event
docstring_tokens: register an array of plugins objects and allow the plugins to join the process of handling this event