Back to ConsoleApplication class

Method setSession

public $this
setSession
(\Joomla\Session\SessionInterface $session)
Sets the session for the application to use, if required.
Parameters
  • \Joomla\Session\SessionInterface $session A session object.
Returns
  • $this
Since
  • 4.0.0

Method setSession - Source code

/**
 * Sets the session for the application to use, if required.
 *
 * @param   SessionInterface  $session  A session object.
 *
 * @return  $this
 *
 * @since   4.0.0
 */
public function setSession(SessionInterface $session) : self
{
    $this->session = $session;
    return $this;
}