public function setController($controller)
    {
        if (empty($controller)) {
            $this->controller = null;
            return $this;
        }

        if (!is_string($controller)) {
            throw new InvalidArgumentException(
                'Handler view controller must be a string.'
            );
        }

        $this->controller = $controller;
        return $this;
    }