src/ResponseBuilder.php
public function expires($time)
    {
        if (!empty($time) && is_string($time) && !$timestamp = strtotime($time)) {
            throw new \Ergo\Routing\Exception("Invalid expiry time: $timestamp");
        } else if (is_numeric($time)) {
            $timestamp = $time;
        } else if ($time == false) {
            return $this;
        }

        $this->addHeader('Expires', date('r', $timestamp));

        return $this;
    }
public function expires($time)
    {
        if (!empty($time) && is_string($time) && !$timestamp = strtotime($time)) {
            throw new \Ergo\Routing\Exception("Invalid expiry time: $timestamp");
        } else if (is_numeric($time)) {
            $timestamp = $time;
        } else if ($time == false) {
            return $this;
        }

        $this->addHeader('Expires', date('r', $timestamp));

        return $this;
    }
public function expires ( $ time ) { if ( ! empty ( $ time ) && is_string ( $ time ) && ! $ timestamp = strtotime ( $ time ) ) { throw new \ Ergo \ Routing \ Exception ( "Invalid expiry time: $timestamp" ) ; } else if ( is_numeric ( $ time ) ) { $ timestamp = $ time ; } else if ( $ time == false ) { return $ this ; } $ this -> addHeader ( 'Expires' , date ( 'r' , $ timestamp ) ) ; return $ this ; }
Sets the Expires header based on a Unix timestamp.
@param int Unix timestamp
@chainable
Sets the Expires header based on a Unix timestamp .