Airship\Hangar\Command::getSession PHP Method

getSession() final protected method

Get the session data
final protected getSession ( ) : mixed
return mixed
    protected final function getSession()
    {
        if (!@\is_readable(AIRSHIP_LOCAL_CONFIG . '/hangar.session.json')) {
            throw new \Error('There is no active Hangar session');
        }
        $session = \file_get_contents(AIRSHIP_LOCAL_CONFIG . '/hangar.session.json');
        return $this->session = \json_decode($session, true);
    }