original_string: protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null)
      {
          if ($callback instanceof Closure) {
              $this->addEventListener($prefix.$view, $callback, $priority);
  
              return $callback;
          } else if (is_string($callback)) {
              return $this->addClassEvent($view, $callback, $prefix, $priority);
          }
      }
code: protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null)
      {
          if ($callback instanceof Closure) {
              $this->addEventListener($prefix.$view, $callback, $priority);
  
              return $callback;
          } else if (is_string($callback)) {
              return $this->addClassEvent($view, $callback, $prefix, $priority);
          }
      }
code_tokens: protected function addViewEvent ( $ view , $ callback , $ prefix = 'composing: ' , $ priority = null ) { if ( $ callback instanceof Closure ) { $ this -> addEventListener ( $ prefix . $ view , $ callback , $ priority ) ; return $ callback ; } else if ( is_string ( $ callback ) ) { return $ this -> addClassEvent ( $ view , $ callback , $ prefix , $ priority ) ; } }
docstring: Add an event for a given view.
  
  @param  string  $view
  @param  \Closure|string  $callback
  @param  string  $prefix
  @param  int|null  $priority
  @return \Closure
docstring_tokens: Add an event for a given view .