public function learn($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 (is_callable($default)) {
$default = call_user_func($default);
}
return $this->memorize($key, $default);
} else {
return $this->recall($key);
}
}