AppserverIo\Appserver\Core\Modules\StorageProvider\SystemConfigurationResolverFactory::factory PHP 메소드

factory() 공개 정적인 메소드

Factory method to create a new DNS resolver instance.
public static factory ( AppserverIo\Server\Interfaces\ServerContextInterface $serverContext, AppserverIo\Server\Interfaces\ModuleConfigurationInterface $moduleConfiguration ) : AppserverIo\DnsServer\StorageProvider\StorageProviderInterface
$serverContext AppserverIo\Server\Interfaces\ServerContextInterface The server context for the resolver
$moduleConfiguration AppserverIo\Server\Interfaces\ModuleConfigurationInterface The module configuration with the initialization parameters
리턴 AppserverIo\DnsServer\StorageProvider\StorageProviderInterface The initialized DNS resolver
    public static function factory(ServerContextInterface $serverContext, ModuleConfigurationInterface $moduleConfiguration)
    {
        // laod the system configuration from the server context
        $systemConfiguration = $serverContext->getContainer()->getInitialContext()->getSystemConfiguration();
        // initialize the storage provider
        $storageProvider = new SystemConfigurationStorageProvider($systemConfiguration, $moduleConfiguration);
        // initialize the DNS resolver to load the DNS entries from the storage
        return new StackableResolver(array($storageProvider, new RecursiveProvider()));
    }
SystemConfigurationResolverFactory