public function getInitialContext();
/** * Initializes the context with the connection to the storage backend. * * @param \AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration The system configuration */ public function __construct(SystemConfigurationInterface $systemConfiguration) { // initialize the storage $initialContextNode = $systemConfiguration->getInitialContext(); $storageNode = $initialContextNode->getStorage(); $reflectionClass = $this->newReflectionClass($storageNode->getType()); // create the storage instance $storage = $reflectionClass->newInstance(); // append the storage servers registered in system configuration foreach ($storageNode->getStorageServers() as $storageServer) { $storage->addServer($storageServer->getAddress(), $storageServer->getPort(), $storageServer->getWeight()); } // add the storage to the initial context $this->setStorage($storage); // attach the system configuration to the initial context $this->setSystemConfiguration($systemConfiguration); }