Back to JoomlaStorage class

Method has

public bool
has
(string $name)
Check whether data exists in the session store
Parameters
  • string $name Name of variable
Returns
  • bool True if the variable exists
Since
  • 4.0.0
Class: JoomlaStorage
Project: Joomla

Method has - Source code

/**
 * Check whether data exists in the session store
 *
 * @param   string  $name  Name of variable
 *
 * @return  boolean  True if the variable exists
 *
 * @since   4.0.0
 */
public function has(string $name) : bool
{
    if (!$this->isStarted()) {
        $this->start();
    }
    return $this->data->exists($name);
}