protected function getExpireTime($expire)
    {
        if ($expire instanceof \DateTime) {
            $expire = $expire->getTimestamp() - time();
        }

        return (int) $expire;
    }
protected function getExpireTime($expire)
    {
        if ($expire instanceof \DateTime) {
            $expire = $expire->getTimestamp() - time();
        }

        return (int) $expire;
    }
protected function getExpireTime ( $ expire ) { if ( $ expire instanceof \ DateTime ) { $ expire = $ expire -> getTimestamp ( ) - time ( ) ; } return ( int ) $ expire ; }
Turn the DateTime type into an integer type timestamp.
@param \DateTime|int|string $expire
@author : evalor <master@evalor.cn>
@return int
Turn the DateTime type into an integer type timestamp .