AbstractObject::recall PHP Method

recall() public method

Returns session data for this object. If not previously set, then $default is returned.
public recall ( string $key, mixed $default = null ) : mixed
$key string Data Key
$default mixed Default value
return mixed Previously memorized data or $default
    public function recall($key, $default = null)
    {
        /** @type App_Web $this->app */
        if (!session_id()) {
            $this->app->initializeSession(false);
        }
        if (!isset($_SESSION['o'][$this->name][$key]) || is_null($_SESSION['o'][$this->name][$key])) {
            if (!isset($_SESSION['s'][$this->name][$key])) {
                return $default;
            }
            $v = $this->add(unserialize($_SESSION['s'][$this->name][$key]));
            $v->init();
            return $v;
        }
        return $_SESSION['o'][$this->name][$key];
    }