Back to JoomlaStorage class

Method get

public mixed
get
(string $name, mixed $default)
Get data from the session store
Parameters
  • string $name Name of a variable
  • mixed $default Default value of a variable if not set
Returns
  • mixed Value of a variable
Since
  • 4.0.0
Class: JoomlaStorage
Project: Joomla

Method get - Source code

/**
 * Get data from the session store
 *
 * @param   string  $name     Name of a variable
 * @param   mixed   $default  Default value of a variable if not set
 *
 * @return  mixed  Value of a variable
 *
 * @since   4.0.0
 */
public function get(string $name, $default)
{
    if (!$this->isStarted()) {
        $this->start();
    }
    return $this->data->get($name, $default);
}