web\Session getIsActive()

getIsActive() public method public boolean getIsActive ( )return boolean Whether the session has started

web\Session getId()

getId() public method Gets the session ID. This is a wrapper for PHP session_id(). public string getId ( )return string The current session ID

web\Session getHasSessionId()

getHasSessionId() public method Returns a value indicating whether the current request has sent the session ID. The default implementation will check cookie and $_GET using the session name. If you send session ID via other ways, you may need to override this method or call setHasSessionId() to explicitly set whether the session ID is sent. public boolean getHasSessionId ( )return boolean Whether the current request has sent the session ID.

web\Session getGCProbability()

getGCProbability() public method public float getGCProbability ( )return float The probability (percentage) that the GC (garbage collection) process is started on every session initialization, defaults to 1 meaning 1% chance.

web\Session getFlash()

getFlash() public method Returns a flash message. See also: setFlash() addFlash() hasFlash() getAllFlashes() removeFlash() public mixed getFlash ( $key, $defaultValue = null, $delete = false )$key string The key identifying the flash message $defaultValue mixed Value to be returned if the flash message does not exist. $delete boolean Whether to delete this flash message right after this method is called. If false, the flash message will be automatically deleted in the next request.

web\Session getCount()

getCount() public method Returns the number of items in the session. public integer getCount ( )return integer The number of session variables

web\Session getCookieParams()

getCookieParams() public method See also http://php.net/manual/en/function.session-get-cookie-params.php. public array getCookieParams ( )return array The session cookie parameters.

web\Session getAllFlashes()

getAllFlashes() public method Returns all flash messages. You may use this method to display all the flash messages in a view file: <?php foreach (Yii::$app->session->getAllFlashes() as $key => $message) { echo '<div class="alert alert-' . $key . '">' . $message . '</div>'; } ?> With the above code you can use the bootstrap alert classes such as success, info, danger as the flash message key to influence the color of the div. Note that if you use addFlash(),

web\Session get()

get() public method Returns the session variable value with the session variable name. If the session variable does not exist, the $defaultValue will be returned. public mixed get ( $key, $defaultValue = null )$key string The session variable name $defaultValue mixed The default value to be returned when the session variable does not exist. return mixed The session variable value, or $defaultValue if the session variable does not exist.

web\Session gcSession()

gcSession() public method Session GC (garbage collection) handler. This method should be overridden if $useCustomStorage returns true. Do not call this method directly. public boolean gcSession ( $maxLifetime )$maxLifetime integer The number of seconds after which data will be seen as 'garbage' and cleaned up. return boolean Whether session is GCed successfully