wangdimeng@gmai 2015-12-03 23:35:41 2883次浏览 0条回复 1 0 0

见yii\web\Session 812行

/**
    * Returns a value indicating whether there are flash messages associated with the specified key.
    * @param string $key key identifying the flash message type
    * @return boolean whether any flash messages exist under specified key
*/
public function hasFlash($key)
{
    return $this->getFlash($key) !== null;
}

对比yii1中的CWebUser 第686行

/**
    * @param string $key key identifying the flash message
    * @return boolean whether the specified flash message exists
*/
public function hasFlash($key)
{
    return $this->getFlash($key, null, false)!==null;
}
    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册