public function before($callback)
    {
        $callbacks = $this->getOption('_before_middlewares');
        $callbacks[] = $callback;
        $this->setOption('_before_middlewares', $callbacks);

        return $this;
    }
public function before($callback)
    {
        $callbacks = $this->getOption('_before_middlewares');
        $callbacks[] = $callback;
        $this->setOption('_before_middlewares', $callbacks);

        return $this;
    }
public function before ( $ callback ) { $ callbacks = $ this -> getOption ( '_before_middlewares' ) ; $ callbacks [ ] = $ callback ; $ this -> setOption ( '_before_middlewares' , $ callbacks ) ; return $ this ; }
Sets a callback to handle before triggering the route callback.

@param mixed $callback A PHP callback to be triggered when the Route is matched, just before the route callback

@return Route $this The current Route instance
Sets a callback to handle before triggering the route callback .