original_string: public function addMiddleware(Middleware $middleware)
      {
          $group = $middleware->getGroup();
          if (! isset($this->middleware[$group])) {
              $this->middleware[$group] = array(
                  'before' => array(),
                  'after' => array()
              );
          }
  
          $this->middleware[$group][$middleware->getPosition()][] = &$middleware;
      }
code: public function addMiddleware(Middleware $middleware)
      {
          $group = $middleware->getGroup();
          if (! isset($this->middleware[$group])) {
              $this->middleware[$group] = array(
                  'before' => array(),
                  'after' => array()
              );
          }
  
          $this->middleware[$group][$middleware->getPosition()][] = &$middleware;
      }
code_tokens: public function addMiddleware ( Middleware $ middleware ) { $ group = $ middleware -> getGroup ( ) ; if ( ! isset ( $ this -> middleware [ $ group ] ) ) { $ this -> middleware [ $ group ] = array ( 'before' => array ( ) , 'after' => array ( ) ) ; } $ this -> middleware [ $ group ] [ $ middleware -> getPosition ( ) ] [ ] = & $ middleware ; }
docstring: Add middleware trigger to registry.
  
  @param Middleware $middleware
docstring_tokens: Add middleware trigger to registry .