Create Component driver.
@param  string  $name
@return \Antares\Contracts\Memory\Provider
3731
protected function createComponentDriver($name)
    {
        $config = Arr::get($this->config, "component.{$name}", []);
        $cache  = $this->getCacheRepository($config);
        return $this->createProvider(new Component($name, $config, $this->app, $cache));
    }
822957
protected function createDriver($driver): Contracts\Factory
    {
        if (\is_null($this->setupDriverConfig($driver))) {
            throw new InvalidArgumentException("Driver [$driver] not supported.");
        }

        return new $this->resolver($this->app, $this, $driver);
    }
854215
public function createNode($name)
    {
        $node = new \PAGI\Node\Node();
        return $node->setName($name)->setAgiClient($this);
    }
1238881
protected function resolve($name)
    {
        $config = $this->app['config']->get(\sprintf('log.channels.%s', $name));

        if (is_null($config)) {
            throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name));
        }

        if (isset($this->customCreators[$config['driver']])) {
            return $this->callCustomCreator($config);
        }

        $driverMethod = 'create'.ucfirst($config['driver']).'Driver';

        if (method_exists($this, $driverMethod)) {
            return $this->{$driverMethod}($config);
        }

        throw new \InvalidArgumentException(\sprintf('Driver [%s] is not supported.', $config['driver']));
    }
473539
protected function createComponent($name)
    {
        $result = null;

        $config = $this->getComponentConfig($name);

        if ($config !== null && isset($config['class'])) {
            $result = new $config['class'];
            if (!($result instanceof \pwf\basic\interfaces\Component)) {
                throw new \Exception('Component must implement \'Component\' interface',
                500);
            }
            $result->loadConfiguration($config);
        }

        return $result;
    }
280152
public function createService(ServiceLocatorInterface $serviceLocator, $name = null)
    {
        $config = $serviceLocator->get('Config');

        if (! $config['ocra_service_manager']['logged_service_manager']) {
            return $serviceLocator;
        }

        /* @var $proxyFactory \ProxyManager\Factory\AccessInterceptorScopeLocalizerFactory */
        $proxyFactory = $serviceLocator->get('OcraServiceManager\\ServiceManager\\AccessInterceptorProxyFactory');
        /* @var $locatorInterceptors \Closure[] */
        $locatorInterceptors = $serviceLocator->get('OcraServiceManager\\ServiceManager\\AccessInterceptors');

        // @todo maybe this should be a callback, and `locatorInterceptors` should not be used explicitly
        $proxyLocator = $proxyFactory->createProxy($serviceLocator, array(), $locatorInterceptors);

        if (! ($name && $serviceLocator instanceof ServiceManager)) {
            return $proxyLocator;
        }

        // @todo this service hardcoding should be removed
        $allowOverrides = $serviceLocator->getAllowOverride();

        $serviceLocator->setAllowOverride(true);
        $serviceLocator->setService('ServiceManager', $proxyLocator);
        $serviceLocator->setAllowOverride($allowOverrides);

        return $proxyLocator;
    }
1238543
public static function create($name)
    {
        if (!isset(self::$adapters[$name])) {
            throw HttpAdapterException::httpAdapterDoesNotExist($name);
        }

        if (!self::capable($name)) {
            throw HttpAdapterException::httpAdapterIsNotUsable($name);
        }

        return new self::$adapters[$name]['adapter']();
    }
710127
protected function createDriver($driverName)
    {
        [$driver, $name] = $this->getDriverName($driverName);

        $method = 'create'.Str::studly($driver).'Driver';

        // We'll check to see if a creator method exists for the given driver.
        // If not we will check for a custom driver creator, which allows
        // developers to create drivers using their own customized driver
        // creator Closure to create it.
        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driverName);
        } elseif (\method_exists($this, $method)) {
            return $this->{$method}($name);
        }

        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
704379
public function setDefault($name)
    {
        $name = strtolower($name);

        if (!isset($this->drivers[$name])) {
            throw new InvalidArgumentException(
                "Unregistered cache driver name '$name'"
            );
        }

        $this->default = $name;

        return $this;
    }
278188
public function create(string $name)
    {
        $className = $this->getClassName($name);

        $result = $this->createInstance($className);

        return $result;
    }
1178572
protected function makeCurrentDriver(string $name): ITaxFacade
    {
        $this->currentDriver = app($this->getDriver($name), [
            'config' => config('taxes.' . $name),
        ]);

        return $this;
    }
65921
private static function createFromConfig($name): Storage\StorageInterface
    {
        $config = &self::$config['storage'][$name];
        $driver = &$config['driver'];
        $config = &$config['config'];

        return new self::$driver[$driver]($config);
    }
206173
public function getComponentByName($name)
    {
        foreach ($this->components as $component) {
            if ($component->getName() == $name) {
                return $component;
            }
        }
    }
74020
protected function createConnection($name)
    {
        $config = $this->getConfig($name);

        $connection = new Client($config);

        $connection->connect();

        return $connection;
    }
1274845
protected function makeConnection($name)
    {
        $config = $this->getConnectionConfig($name);

        if (isset($this->extensions[$name])) {
            return call_user_func($this->extensions[$name], $config, $name);
        }

        if (!isset($config['driver'])) {
            throw new InvalidArgumentException(
                sprintf('The pub-sub connection [%s] is missing a "driver" config var.', $name)
            );
        }

        return $this->factory->make($config['driver'], array_except($config, ['driver']));
    }
1289243
public static function create($name)
    {
        $logger = new Logger($name);

        $localLogConfig = config('logger.local_log');
        if($localLogConfig['enabled'] && !in_array($name, $localLogConfig['exclude_names'])) {
            $streamHandler = self::streamHandler($name);
            $logger->pushHandler($streamHandler);
        }

        $logstashConfig = config('logger.logstash');
        if($logstashConfig['enabled'] && !in_array($name, $logstashConfig['exclude_names'])){
            $gelfHandler = self::logStashHandler($logstashConfig);
            $logger->pushHandler($gelfHandler);
        }

        $requestId = Request::header('x-request-id');
        $logger->setRequestId($requestId);

        return $logger;
    }
546302
public function make($name, $parameters = []) {
		$name = $this->getAlias($name);

		if (is_string($name) && $this->resolved($name)) {
			return $this->instances[$name];
		}

		if (is_callable($name) || (is_string($name) && !$this->registered($name))) {
			return $this->build($name, $parameters ?: []);
		}

		list($builder, $singleton) = $this->extractComponentBuilder($name);

		$component = $this->build($builder, $parameters);

		if ($this->hasExtender($name)) {
			$extenders = $this->getExtenders($name);
			$component = $this->resolveExtend($component, $extenders);
		}

		if ($singleton) {
			$this->instance($name, $component);
		}

		return $component;
	}