protected function locateSession($name = null)
    {
        $name = strtolower($name) ?: $this->defaultSessionName;

        if (null === $name) {
            throw new \InvalidArgumentException('Specify session name to get');
        }

        if (!isset($this->sessions[$name])) {
            throw new \InvalidArgumentException(sprintf('Session "%s" is not registered.', $name));
        }

        $session = $this->sessions[$name];

        return $session;
    }
protected function locateSession($name = null)
    {
        $name = strtolower($name) ?: $this->defaultSessionName;

        if (null === $name) {
            throw new \InvalidArgumentException('Specify session name to get');
        }

        if (!isset($this->sessions[$name])) {
            throw new \InvalidArgumentException(sprintf('Session "%s" is not registered.', $name));
        }

        $session = $this->sessions[$name];

        return $session;
    }
protected function locateSession ( $ name = null ) { $ name = strtolower ( $ name ) ? : $ this -> defaultSessionName ; if ( null === $ name ) { throw new \ InvalidArgumentException ( 'Specify session name to get' ) ; } if ( ! isset ( $ this -> sessions [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Session "%s" is not registered.' , $ name ) ) ; } $ session = $ this -> sessions [ $ name ] ; return $ session ; }
Returns the named or default session without starting it.

@param string $name session name

@return Session

@throws \InvalidArgumentException If the named session is not registered
Returns the named or default session without starting it .