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

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

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

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

        return $this;
    }
public function setCookieLifetime ( $ ttl ) { if ( ! is_null ( $ ttl ) && ! is_numeric ( $ ttl ) ) { throw new InvalidArgumentException ( "No valid ttl provided" ) ; } $ this -> cookieLifetime = ( int ) $ ttl ; return $ this ; }
Set cookie time-to-live.

@param int $ttl Cookie time-to-live.

@return $this
@throws InvalidArgumentException
Set cookie time - to - live .