/** * {@inheritdoc} */ public function loadMergeSources(IncludeCompiler $compiler, $vendor) { $compiler->addSource(new IncludeFileSource(__DIR__, false, ['Komponent', 'RequestScoped'])); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Event')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Filter')); $compiler->addSource(new IncludeEnumerationSource(__DIR__ . '/Resource', ['ResourceDeliveryMiddleware'])); $compiler->addSource(new IncludeEnumerationSource(__DIR__ . '/Rest', ['RestResource', 'ResourceMountHandler', 'ResourceMountLoader'])); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Router', false, ['Dispatchable*', '*Command'])); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Security')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Session')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/View', false, ['ExtendedNativeViewRenderer'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/http/src', false, ['*Stream'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/http/src/Entity', ['AbstractEntity', 'EntityInterface', 'StreamEntity', 'StringEntity'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/http/src/Header', ['ContentTypeHeader', 'AbstractHeader', 'HttpHeaderInterface', 'DirectivesInterface', 'DirectivesTrait', 'Directives'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/router/src', false, ['*Exception'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/security/src', ['AnonymousPrincipal', 'MutableSecurityContextInterface', 'Principal', 'PrincipalInterface', 'PrincipalProviderInterface', 'SecurityContext', 'SecurityContextInterface', 'SecurityContextPrincipal', 'SecurityUtil', 'DigestPrincipalProviderInterface'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/security/src/Authentication', ['AbstractAuthenticationProvider', 'AuthenticationProviderInterface'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/security/src/Authentication/Token', ['AbstractToken', 'TokenInterface'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/security/src/Firewall', ['AbstractFirewall', 'FirewallInterface'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/session/src')); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/session/src/Storage', ['SessionStorageInterface'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/view/src', false, ['TagBuilder', 'ViewModel', 'Mutable*'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/nikic/fast-route/src', ['DataGenerator', 'Route', 'Dispatcher'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/nikic/fast-route/src/DataGenerator', ['GroupCountBased', 'RegexBasedAbstract'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/nikic/fast-route/src/Dispatcher', ['GroupCountBased', 'RegexBasedAbstract'])); }
public function loadMergeSources(IncludeCompiler $compiler, $vendor) { $compiler->addSource(new IncludeEnumerationSource(__DIR__, ['BusinessProcessScopeManager'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/bpmn/src/Delegate', ['DelegateExecutionInterface'])); }
public function createCompiler() { $compiler = new IncludeCompiler(); $compiler->addSource(new IncludeEnumerationSource(__DIR__, ['MergedSourceInterface', 'MergeSourceProviderInterface', 'ResourceStreamWrapper'])); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Database', false, ['*Command'])); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Event')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Expression')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Kernel')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Komponent')); $compiler->addSource(new IncludeFileSource(__DIR__ . '/Log')); $dir = __DIR__; do { $autoload = $dir . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; if (is_file($autoload)) { $vendor = dirname($autoload); break; } $dir = dirname($dir); } while (false !== strpos($dir, DIRECTORY_SEPARATOR)); if (!isset($vendor)) { throw new \RuntimeException(sprintf('Vendor directory not found')); } $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/config/src', ['Configuration'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/context/src', false, ['CompiledCodeFragment', 'Container', 'ContainerCompiler'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/context/src/Bind', false, ['AbstractSetterFilter', 'Binding', 'ContainerBuilder', 'Inject', 'Setter*'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/context/src/Locator', ['BindingServiceLocator', 'ServiceLocatorInterface'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/context/src/Scope', false, ['*Exception', 'ApplicationScoped', 'Dependent', 'Singleton'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/event/src', false, [])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/expression/src', false, ['*Exception'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/expression/src/Resolver', false, [])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/meta/src/Info', ['ReflectionTypeInfoManager', 'TypeInfoManagerInterface'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/koolkode/stream/src', ['AbstractInputStream', 'AbstractOutputStream', 'ResourceInputStream', 'ResourceOutputStream', 'StreamProxy', 'StreamWrapper'])); $compiler->addSource(new IncludeFileSource($vendor . '/koolkode/util/src', false, ['*Exception', 'BitField', 'RandomLibGenerator', 'TopSort*'])); $compiler->addSource(new IncludeEnumerationSource($vendor . '/psr/log/Psr/Log', ['LoggerInterface'])); foreach ($this->kernel->getKomponents() as $komponent) { if ($komponent instanceof MergeSourceProviderInterface) { $komponent->loadMergeSources($compiler, $vendor); } } return $compiler; }