OCA\Richdocuments\Controller\SessionController::loadSession PHP Method

loadSession() protected method

protected loadSession ( $esId )
    protected function loadSession($esId)
    {
        if (!$esId) {
            throw new \Exception('Session id can not be empty');
        }
        $session = new Db\Session();
        $session->load($esId);
        if (!$session->getEsId()) {
            throw new \Exception('Session does not exist');
        }
        return $session;
    }