Loads the session with the passed ID from the persistence layer and
returns it.

@param string $id The ID of the session we want to unpersist

@return \AppserverIo\Psr\Servlet\ServletSessionInterface The unpersisted session
436324
public function load($id)
    {

        try {
            // prepare the pathname to the file containing the session data
            $filename = $this->getSessionSettings()->getSessionFilePrefix() . $id;
            $pathname = $this->getSessionSavePath($filename);

            // unpersist and return the session from the file system
            return $this->unpersist($pathname);

        } catch (SessionDataNotReadableException $sdnre) {
            $this->delete($id);
            throw $sdnre;
        }
    }
173052
public function read( $id ) {

		$id = $this->getKey( $id );

		// If possible use the raw data from the internal cache
		// without unserialization
		if ( $this->internalCache->contains( $id ) ) {
			$data = $this->internalCache->fetch( $id );
		} elseif ( $this->cache->contains( $id ) ) {
			$data = unserialize( $this->cache->fetch( $id ) );
			$this->internalCache->save( $id, $data );
		} else {
			$data = array();
		}

		$container = new Container( $id, (array)$data );
		$container->setExpiryInSeconds( $this->expiry );

		return $container;
	}
1157667
public function read($id)
    {
        $this->openSessionId = $id;
        // PHP expects an empty string to be returned from this method if no
        // data is retrieved
        $this->dataRead = '';

        // Get session data using the selected locking strategy
        $item = $this->connection->read($this->formatId($id));

        // Return the data if it is not expired. If it is expired, remove it
        if (isset($item['expires']) && isset($item['data'])) {
            $this->dataRead = $item['data'];
            if ($item['expires'] <= time()) {
                $this->dataRead = '';
                $this->destroy($id);
            }
        }

        return $this->dataRead;
    }
809750
public function load($id = null)
    {
        if(is_null($id) && Mage::getSingleton('customer/session')->isLoggedIn()) {
            $this->customer = Mage::getSingleton('customer/session')->getCustomer();
        } else if(is_int($id)) {
            $this->customer = Mage::getModel('customer/customer')->load($id);
            
            // TODO: Implement
        }

        if(!$this->customer->getId()) {
            return $this;
        }

        if(!($socialconnectLid = $this->customer->getInchooSocialconnectTid()) ||
                !($socialconnectTtoken = $this->customer->getInchooSocialconnectTtoken())) {
            return $this;
        }

        $this->setAccessToken($socialconnectTtoken);
        $this->_load();

        return $this;
    }
443744
public function tryLoad($id)
    {
        if (is_null($id)) {
            throw $this->exception('Record ID must be specified, otherwise use loadAny()');
        }

        return $this->_load($id, true);
    }
1247523
public function read($id) {
        $tmp      = $_SESSION;
        $key      = $this->getKey($id);
        $_SESSION = json_decode($this->mem->get($key, false, ''), true);


        // TODO: replace all of this with custom session data modifiers to be executed one by one
        // TODO: Create CachedSessionHandler that accepts AbstractStorage as its storage
        // TODO: Refactor this to extend CachedSessionHandler and use JSON encode/decode where needed
        $user = $this->getUser();

        if ($user instanceof UserInterface) {
            $roles = array();
            /** @var RoleInterface $role */
            foreach ($user->getRoles() as $role) {
                $roles[] = $role->getRole();
            }
            $userData         = array(
                'username' => $user->getUsername(),
                'roles'    => $roles
            );
            $_SESSION['user'] = $userData;
        }

        if (isset($_SESSION) && !empty($_SESSION) && $_SESSION != null) {
            $new_data = session_encode();
            $_SESSION = $tmp;
            return $new_data;
        }
        return '';
    }
844256
public function load($id = null)
    {
        if (!is_null($id)) {
            $this->setId($id);
        }

        $this->isLoaded = false;
        $data = $this->getDbGateway()->load($this->getId());
        if ($data) {
            $this->setData($data);
            $this->isLoaded = true;
        }

        return $this->isLoaded();
    }
1142911
public function get($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		$result = $this->getClient()->get($this->prepareId($id));
		
		return $result === false ? null : $result;
	}
30052
public function loadBlock($id)
    {
        if (isset($this->blocksById[$id])) {
            return $this->blocksById[$id];
        }

        $contentId = $this->getStorageGateway()->getContentIdByBlockId($id);
        $content = $this->contentService->loadContent($contentId);

        foreach ($content->getFields() as $field) {
            if (!$field->value instanceof Value) {
                continue;
            }

            foreach ($field->value->page->zones as $zone) {
                foreach ($zone->blocks as $block) {
                    if ($block->id === $id) {
                        return $this->blocksById[$id] = $block;
                    }
                }
            }
        }

        throw new NotFoundException('Block', $id);
    }
273111
public function onceUsingId($id)
    {
        $this->setUser($this->provider->retrieveById($id));

        return $this->user instanceof UserContract;
    }
766600
public function remove($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		return $this->getClient()->delete($this->prepareId($id));
	}
1363569
protected function getUser($id)
    {
        if (!isset($this->retrievedUsers[$id])) {
            $user = $this->userMapper->findById($id);
            $this->retrievedUsers[$id] = $user;
        }

        return $this->retrievedUsers[$id];
    }
1272645
public function loadFromFlexiBee($id = null)
    {
        $data = [];
        if (is_null($id)) {
            $id = $this->getMyKey();
        }
        $flexidata = $this->getFlexiData($this->getEvidenceUrl().'/'.self::urlizeId($id));
        if ($this->lastResponseCode == 200) {
            $this->apiURL = $this->curlInfo['url'];
            if (is_array($flexidata) && (count($flexidata) == 1) && is_array(current($flexidata))) {
                $data = current($flexidata);
            }
        }
        return $this->takeData($data);
    }
591455
public function loadAppServer($id)
    {
        /** @var \OxidEsales\Eshop\Core\DataObject\ApplicationServer $appServer */
        $appServer = $this->appServerDao->findAppServer($id);
        if ($appServer === null) {
            /** @var \OxidEsales\Eshop\Core\Exception\NoResultException $exception */
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\NoResultException::class);
            throw $exception;
        }
        return $appServer;
    }
1091433
final public function load($id = null)
    {
        if ($id === null) {
            $id = $this->id();
        }
        $this->source()->loadItem($id, $this);
        return $this;
    }
1045270
public static function getLogin($id) {
		try {
			return \App::$domain->account->login->oneById($id);
		} catch(NotFoundHttpException $e) {}
		return \App::$domain->account->login->oneByLogin($id);
	}
1052483
public function getById($id)
    {
        $key = $this->adapter->get(sprintf('%s/account/keys/%d', $this->endpoint, $id));

        $key = json_decode($key);

        return new KeyEntity($key->ssh_key);
    }