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);
        }
    }
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);
        }
    }
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 ) ; } }
Add an event for a given view.

@param  string  $view
@param  \Closure|string  $callback
@param  string  $prefix
@param  int|null  $priority
@return \Closure
Add an event for a given view .