public function ttl($ttl = null)
    {
        if ($ttl === null) {
            return (int) $this->ttl;
        }

        if ($ttl instanceof \DateTime) {
            return $this->ttl = $ttl->format('U');
        }

        return $this->ttl = time() + (int) $ttl;
    }
public function ttl($ttl = null)
    {
        if ($ttl === null) {
            return (int) $this->ttl;
        }

        if ($ttl instanceof \DateTime) {
            return $this->ttl = $ttl->format('U');
        }

        return $this->ttl = time() + (int) $ttl;
    }
public function ttl ( $ ttl = null ) { if ( $ ttl === null ) { return ( int ) $ this -> ttl ; } if ( $ ttl instanceof \ DateTime ) { return $ this -> ttl = $ ttl -> format ( 'U' ) ; } return $ this -> ttl = time ( ) + ( int ) $ ttl ; }
Returns cookie TTL

@param int $ttl

@return int
Returns cookie TTL