AppserverIo\Appserver\Core\AbstractContainerThread::registerClassLoaders PHP Метод

registerClassLoaders() защищенный Метод

Register's the class loaders configured for this container.
protected registerClassLoaders ( AppserverIo\Storage\GenericStackable $classLoaders ) : void
$classLoaders AppserverIo\Storage\GenericStackable The container for the class loader instances
Результат void
    protected function registerClassLoaders(GenericStackable $classLoaders)
    {
        // intialize the additional container class loaders
        foreach ($this->getContainerNode()->getClassLoaders() as $classLoaderNode) {
            // initialize the storage for the include path
            $includePath = array();
            // load the application base directory
            $appBase = $this->getAppBase();
            // load the composer class loader for the configured directories
            foreach ($classLoaderNode->getDirectories() as $directory) {
                // we prepare the directories to include scripts AFTER registering (in application context)
                $includePath[] = $appBase . $directory->getNodeValue();
            }
            // load the class loader type
            $className = $classLoaderNode->getType();
            // initialize and register the class loader instance
            $classLoaders[$classLoaderNode->getName()] = new $className(new GenericStackable(), $includePath);
            $classLoaders[$classLoaderNode->getName()]->register(true, true);
        }
    }