Stash\Item::expiresAt PHP Method

expiresAt() public method

public expiresAt ( $expiration = null )
    public function expiresAt($expiration = null)
    {
        if (!is_null($expiration) && !$expiration instanceof \DateTimeInterface) {
            # For compatbility with PHP 5.4 we also allow inheriting from the DateTime object.
            if (!$expiration instanceof \DateTime) {
                throw new InvalidArgumentException('expiresAt requires \\DateTimeInterface or null');
            }
        }
        $this->expiration = $expiration;
        return $this;
    }