vendor/codeages/biz-framework/src/Token/Dao/Impl/TokenDaoImpl.php

(开头部分) 859B

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Codeages\Biz\Framework\Token\Dao\Impl;

use Codeages\Biz\Framework\Token\Dao\TokenDao;
use Codeages\Biz\Framework\Dao\GeneralDaoImpl;

class TokenDaoImpl extends GeneralDaoImpl implements TokenDao
{
    protected $table = 'biz_token';

    public function getByKey($key)
    {
        return $this->getByFields(array('_key' => $key));
    }

    public function deleteExpired($timestamp)
    {
        $sql = "DELETE FROM {$this->table()} WHERE expired_time > 0 AND expired_time < ?";
        $this->db()->executeQuery($sql, array(intval($timestamp)));
    }

    public function declares()
    {
        return array(
            'timestamps' => array('created_time'),
            'serializes' => array('data' => 'php'),
            'cache' => false, // 该Dao禁用Cache
            'conditions' => array(
            ),
        );
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。