public function setExpires($period)
    {
        if (is_int($period))
            return $this->setExpiresInSeconds($period);
        if ($period instanceof DateTimeInterface)
            return $this->setExpireDate($period);
        if ($period instanceof DateInterval)
            return $this->setExpiresIn($period);

        throw new \InvalidArgumentException("A DateTime, DateInterval or int number of seconds is required");
    }
public function setExpires($period)
    {
        if (is_int($period))
            return $this->setExpiresInSeconds($period);
        if ($period instanceof DateTimeInterface)
            return $this->setExpireDate($period);
        if ($period instanceof DateInterval)
            return $this->setExpiresIn($period);

        throw new \InvalidArgumentException("A DateTime, DateInterval or int number of seconds is required");
    }
public function setExpires ( $ period ) { if ( is_int ( $ period ) ) return $ this -> setExpiresInSeconds ( $ period ) ; if ( $ period instanceof DateTimeInterface ) return $ this -> setExpireDate ( $ period ) ; if ( $ period instanceof DateInterval ) return $ this -> setExpiresIn ( $ period ) ; throw new \ InvalidArgumentException ( "A DateTime, DateInterval or int number of seconds is required" ) ; }
Set the when the cache should expire. Wrapper for setExpiresIn,
setExpiresInSeconds and setExpireDate, with type detection.

@param mixed $period Can be int (seconds), DateTimeInterface or DateInterval.
@return CachePolicy Provides fluent interface
Set the when the cache should expire . Wrapper for setExpiresIn setExpiresInSeconds and setExpireDate with type detection .