public function setCookieLifetime($ttl)
    {
        if (!is_null($ttl)
            && !is_numeric($ttl)
        ) {
            throw new InvalidArgumentException("No valid ttl provided");
        }

        $this->cookieLifetime = (int)$ttl;

        return $this;
    }