public function setController($controller)
    {
        // controller must be a callable
        if (!is_callable($controller)) {
            throw new \LogicException(sprintf(
                'The controller must be a callable (%s given).',
                gettype($controller)
            ));
        }

        $this->controller = $controller;
    }
public function setController($controller)
    {
        // controller must be a callable
        if (!is_callable($controller)) {
            throw new \LogicException(sprintf(
                'The controller must be a callable (%s given).',
                gettype($controller)
            ));
        }

        $this->controller = $controller;
    }
public function setController ( $ controller ) { // controller must be a callable if ( ! is_callable ( $ controller ) ) { throw new \ LogicException ( sprintf ( 'The controller must be a callable (%s given).' , gettype ( $ controller ) ) ) ; } $ this -> controller = $ controller ; }
Sets a controller

@param callable $controller
Sets a controller