Creates and register a configuration

@param string $prefix
@param string $resourceName
@param string $resourceClass
@param array  $templateList
@param string $eventClass
@param string $parentId

@return \Ekyna\Bundle\AdminBundle\Pool\Configuration
324305
public function createConfiguration($prefix, $resourceName, $resourceClass, array $templateList, $eventClass = null, $parentId = null)
    {
        return new Configuration(
            $prefix,
            $resourceName,
            $resourceClass,
            $templateList,
            $eventClass,
            $parentId
        );
    }
87806
public static function create(Domain $domain, $prefix)
    {
        $domain->invokePost('SUBDOMAIN', 'create', ['subdomain' => $prefix]);
        return new self($prefix, $domain);
    }
371252
public function create(): ResourceNameCollection
    {
        $classes = [];
        if ($this->decorated) {
            foreach ($this->decorated->create() as $resourceClass) {
                $classes[$resourceClass] = true;
            }
        }

        foreach ($this->extractor->getResources() as $resourceClass => $resource) {
            $classes[$resourceClass] = true;
        }

        return new ResourceNameCollection(array_keys($classes));
    }
665152
public static function createConfiguration($isDevMode = false, $proxyDir = null, ?Cache $cache = null)
    {
        $proxyDir = $proxyDir ?: sys_get_temp_dir();

        $cache = self::createCacheConfiguration($isDevMode, $proxyDir, $cache);

        $config = new Configuration();
        $config->setMetadataCacheImpl($cache);
        $config->setQueryCacheImpl($cache);
        $config->setResultCacheImpl($cache);
        $config->setProxyDir($proxyDir);
        $config->setProxyNamespace('DoctrineProxies');
        $config->setAutoGenerateProxyClasses($isDevMode);

        return $config;
    }
975186
public static function addName(string $name, string $poolClassName, \Imi\Pool\Interfaces\IPoolConfig $config = null, $resourceConfig = null)
    {
        static::$pools[$name] = BeanFactory::newInstance($poolClassName, $name, $config, $resourceConfig);
        static::$pools[$name]->open();
    }
1317000
public function createInstance(Container $container, ArrayResolver $serviceConfig, $serviceName)
    {
        if (! $this->initialized) {
            $this->initialize($container);
        }

        $sequence = $serviceConfig
            ->resolveStrict($this->activatorKey . '.sequence')
            ->extract();

        for ($i = 0; $i < count($sequence); $i++) {
            $sequence[$i] = array_merge(
                [
                    $sequence[$i]
                ],
                $serviceConfig->resolve($this->activatorKey . '.' . $sequence[$i], [], true)->extract()
            );
        }

        $nextLayerConfig = $serviceConfig->resolve($this->activatorKey . '.handler', null);
        $nextLayer = null;

        if ($nextLayerConfig !== null) {
            $nextLayer = $container->resolve($nextLayerConfig);
        }

        return $this->layerBuilder->build($nextLayer, $sequence);
    }
318157
protected function createResourceRepository(
        $class,
        DocumentManager $documentManager,
        ClassMetadata $metadata,
        ResourceInterface $resource = null
    ) {
        if ($resource !== null && is_a($class, BaseRepositoryInterface::class, true)) {
            return new $class($documentManager, $documentManager->getUnitOfWork(), $metadata, $resource);
        }

        return parent::createRepository($documentManager, $metadata->getName());
    }
1348714
protected function resolveRequestFromConfig($resourceName, $route, Request $request)
    {
        $resourceConfig = $this->config['resources'][ $resourceName ];

        if (in_array($route, ['store', 'update'])) {
            if ($this->hasCustomRequestsForRoute($route, $resourceConfig)) {
                $request = $this->container->make($resourceConfig['requests'][ $route ]);
            } elseif ($this->hasCustomRequestForResource($resourceConfig)) {
                $request = $this->container->make($resourceConfig['request']);
            }
        }

        if ($request instanceof ValidatesWhenResolved) {
            $request->validate();
        }

        return $request;
    }
1068557
public function createNewErrorNode($nodeId, $name, $parentId, $siteId, $language, $template)
    {
        $node = $this->initializeNode(NodeInterface::ROOT_NODE_ID, $language, $siteId);
        $node->setNodeId($nodeId);
        $node->setParentId($parentId);
        $node->setNodeType(ReadNodeInterface::TYPE_ERROR);
        $node->setName($name);
        $node->setInFooter(false);
        $node->setInMenu(false);
        $node->setTemplate($template);
        $node->setOrder(-1);
        $node = $this->setVersionName($node);

        $this->eventDispatcher->dispatch(NodeEvents::NODE_CREATION, new NodeEvent($node));

        return $node;
    }
450360
public function configFor($resourceName, $resourceId = null)
    {
        foreach ($this->providers as $provider) {
            try {
                // Throw NotFound even if other providers dont
                if (!$config = $provider->configFor($resourceName, $resourceId)) {
                    continue;
                }

                return $config;
            } catch (NotFound $e) {
            }
        }

        throw new ResourceNotFoundException("No provider found a config found for '$resourceName' and id '$resourceId'");
    }
310414
public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback)
    {
        $config = $callback();

        if ($config instanceof Configuration) {
            $pathManager = $serviceLocator->get('PathManager');
            $dir = $config->getProxyDir();
            $dir = (strpos($dir, 'data/') === 0)? substr($dir, 0, 5) : 'doctrine/proxies';

            $config->setProxyDir($pathManager->get('var', $dir));
        }

        return $config;
    }
1338142
public function setupParent($prefix, $prefixMatched, $requestPathOffset, $params) {
		$this->prefix = $prefix;
		$this->parentPrefix = $prefix;
		$this->prefixMatched = $prefixMatched;
		$this->parentPrefixMatched = $prefixMatched;
		$this->requestPathOffset = $requestPathOffset;
		$this->parentRequestPathOffset = $requestPathOffset;
		$this->params = $params;
	}
1047223
public function AddSimpleType( $prefix, $localName, $parentType = "xs:anySimpleType", $numeric = false )
	{
		$name = "$prefix:$localName";

		if ( isset( $this->types[ $name ] ) ) return false;

		$parentType = is_null( $parentType ) ? "xs:anySimpleType" : $parentType;

		$this->types[ $name ] = array(
			"parent" => $parentType,
			"prefix" => $prefix,
			"name" => $localName,
			"numeric" => false,
		);

		// BMS 2018-04-09 Fixing the kluge
		if ( $prefix == SCHEMA_PREFIX && ! isset( SchemaTypes::$xsTypes[ $name ] ) )
		{
			SchemaTypes::$xsTypes[ $name ] = $parentType;
		}
	}
824544
public static function prefixPackageAutoloadStatements(stdClass $contents, string $prefix, Whitelist $whitelist): stdClass
    {
        if (isset($contents->autoload)) {
            $contents->autoload = self::prefixAutoloadStatements($contents->autoload, $prefix, $whitelist);
        }

        if (isset($contents->{'autoload-dev'})) {
            $contents->{'autoload-dev'} = self::prefixAutoloadStatements($contents->{'autoload-dev'}, $prefix, $whitelist);
        }

        if (isset($contents->extra, $contents->extra->laravel, $contents->extra->laravel->providers)) {
            $contents->extra->laravel->providers = self::prefixLaravelProviders($contents->extra->laravel->providers, $prefix, $whitelist);
        }

        return $contents;
    }
382346
public function updateConfiguration(ResourceEvent $event)
    {
        $resource = $event->getSubject();

        if ($resource instanceof UserSessionInterface) {
            $configuration = clone $resource->getConfiguration();
            $resource->setConfiguration($configuration);
        }
    }
1012112
public function create(TemplateCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $template = new TemplateModel();
        
        $template
            ->setDispatcher($dispatcher)
            
            ->setLocale($event->getLocale())
            ->setName($event->getTemplateName())
            
            ->save()
        ;
        
        $event->setTemplate($template);
    }
950015
public function createRootNode($siteId, $language, $name, $routePattern, $template)
    {
        $node = $this->initializeNode(NodeInterface::ROOT_PARENT_ID, $language, $siteId);
        $node->setTemplate($template);
        $node->setRoutePattern($routePattern);
        $node->setName($name);
        $node->setInMenu(true);
        $node->setInFooter(true);
        $node = $this->setVersionName($node);

        return $node;
    }