@param string $providerName
@param array $providerData
@param \Nette\PhpGenerator\PhpNamespace $namespace

@return \Nette\PhpGenerator\ClassType
503702
private function createDataProviderClass(
        string $providerName,
        array $providerData,
        PhpNamespace $namespace
    ): ClassType {
        $dataProvider = $this->createNewDataProvider($providerName, $namespace);
        $providerElements = $providerData['elements'];

        foreach ($providerElements as $element) {
            $this->addProperty($dataProvider, $element);
            $this->addGetter($dataProvider, $element, $providerData['configs']);
            $this->addSetter($dataProvider, $element, $providerData['configs']);
            $this->addUnsetter($dataProvider, $element, $providerData['configs']);
            $this->addHas($dataProvider, $element, $providerData['configs']);
            $this->addSingleSetter($element, $dataProvider, $providerData['configs']);

        }

        $this->addElementsGetter($dataProvider, $providerElements);
        return $dataProvider;
    }
291787
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        $intersection_types = $this->getNamespacedIntersectionTypes(
            $namespace,
            $aliased_classes,
            $this_class,
            $use_phpdoc_format
        );

        if ($this->value === 'static') {
            return 'static';
        }

        if ($this->value === $this_class) {
            return 'self' . $intersection_types;
        }

        if ($namespace && stripos($this->value, $namespace . '\\') === 0) {
            return preg_replace(
                '/^' . preg_quote($namespace . '\\') . '/i',
                '',
                $this->value
            ) . $intersection_types;
        }

        if (!$namespace && stripos($this->value, '\\') === false) {
            return $this->value . $intersection_types;
        }

        if (isset($aliased_classes[strtolower($this->value)])) {
            return $aliased_classes[strtolower($this->value)] . $intersection_types;
        }

        return '\\' . $this->value . $intersection_types;
    }
944513
protected function findInternalClass($name, $sectionName)
    {
        // Remove list id like xxx_3
        $classType = $sectionName;
        if (strpos($classType, '_') !== false) {
            $classType = substr($classType, 0, strpos($classType, '_'));
        }

        // Guess the namespace
        $namespacesByType = array(
            'vcs' => 'Liip\RMT\VCS',
            'prerequisites' => 'Liip\RMT\Prerequisite',
            'pre-release-actions' => 'Liip\RMT\Action',
            'post-release-actions' => 'Liip\RMT\Action',
            'version-generator' => 'Liip\RMT\Version\Generator',
            'version-persister' => 'Liip\RMT\Version\Persister',
        );
        $nameSpace = $namespacesByType[$classType];

        // Guess the class name
        // Convert from xxx-yyy-zzz to XxxYyyZzz and append suffix
        $suffixByType = array(
            'vcs' => '',
            'prerequisites' => '',
            'pre-release-actions' => 'Action',
            'post-release-actions' => 'Action',
            'version-generator' => 'Generator',
            'version-persister' => 'Persister',
        );
        $nameSpace = $namespacesByType[$classType];
        $className = str_replace(' ', '', ucwords(str_replace('-', ' ', $name))).$suffixByType[$classType];

        return $nameSpace.'\\'.$className;
    }
1286654
public static Provider getByName(String providerName) {
    checkNotNull(providerName, "providerName");
    Provider matchedProvider = null;
    List<String> providerNames = new ArrayList<String>();
    for (Provider provider : list()) {
      if (provider.name().equals(providerName)) {
        matchedProvider = provider;
        break;
      }
      providerNames.add(provider.name());
    }
    checkArgument(matchedProvider != null, "provider %s not in set of configured providers: %s",
                  providerName,
                  providerNames);
    return matchedProvider;
  }
1147778
public static function getProviderById($providerId)
    {
        foreach (self::getAllProviders() as $provider) {
            if ($provider->getId() == $providerId && $provider->isAvailable()) {
                return $provider;
            }
        }
        
        return null;
    }
897665
protected static function resolveClassNameSpace($classNamespace)
    {
        if (! \is_string($classNamespace)) {
            throw ClassNamespaceResolverException::isNotString();
        }

        if (! \class_exists($classNamespace)) {
            throw ClassNamespaceResolverException::isNotExist();
        }

        $classNamespace = self::classNamespaceDecorator($classNamespace);

        $classInstance = new $classNamespace();

        self::setClass($classNamespace, $classInstance);

        return $classInstance;
    }
10552
public function add($data, $namespace='default')
    {
        Type::force($data, ArrayAccess::class);

        if (!isset($this->addedData[$namespace])) {
            $this->addedData[$namespace] = [];
        }

        $this->addedData[$namespace][] = $data;

        return $this;
    }
1099194
public function fromServices($providerName, array $additionalConfigKeys = [])
    {
        $this->providerName = $providerName;
        $this->getConfigFromServicesArray($providerName);

        $this->additionalConfigKeys = $additionalConfigKeys = array_unique($additionalConfigKeys + ['guzzle']);

        return new Config(
            $this->getFromServices('client_id'),
            $this->getFromServices('client_secret'),
            $this->getFromServices('redirect'),
            $this->getConfigItems($additionalConfigKeys, function ($key) {
                return $this->getFromServices(strtolower($key));
            })
        );
    }
56111
public static function loadCustom($classname, $namespace, $name) {

		if(false === is_string($classname)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($classname)), E_USER_ERROR);
		}

		if(false === is_string($namespace)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($namespace)), E_USER_ERROR);
		}

		if(false === is_string($name)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		static :: $custom[$name] = $namespace;

		return static :: Instance();
	}
21576
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        $intersection_types = $this->getNamespacedIntersectionTypes(
            $namespace,
            $aliased_classes,
            $this_class,
            $use_phpdoc_format
        );

        return $this->param_name . $intersection_types;
    }
1010355
private function getEntityFromIdentityMap($className, array $data)
    {
        /** @var ClassMetadata $class */
        $class = $this->metadataCache[$className];
        $id    = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $data);

        return $this->uow->tryGetById($id, $class->getRootClassName());
    }
1180350
protected function buildProvider($providerDefinition): ServiceProviderInterface
    {
        if (\is_string($providerDefinition)) {
            $provider = $this->buildFromConfig(null, [
                '__class' => $providerDefinition,
                '__construct()' => [
                    $this,
                ]
            ]);
        } elseif (\is_array($providerDefinition) && isset($providerDefinition['__class'])) {
            $providerDefinition['__construct()'] = [
                $this
            ];
            $provider = $this->buildFromConfig(null, $providerDefinition);
        } else {
            throw new InvalidConfigException('Service provider definition should be a class name ' .
                'or array contains "__class" with a class name of provider.');
        }

        if (!($provider instanceof ServiceProviderInterface)) {
            throw new InvalidConfigException(
                'Service provider should be an instance of ' . ServiceProviderInterface::class
            );
        }

        return $provider;
    }
90779
public function toPhpString(
        $namespace,
        array $aliased_classes,
        $this_class,
        $php_major_version,
        $php_minor_version
    ) {
        if ($this->value === 'static') {
            return null;
        }

        return $this->toNamespacedString($namespace, $aliased_classes, $this_class, false);
    }
636013
public function gridBuilder(array $arrayData = null, $datagridName = null, array $datagridClass = array())
    {
        if (!empty($arrayData)) {
            $this->_arrayData = $arrayData;
        }

        if (!empty($datagridClass)) {
            $this->_datagridClass = $datagridClass;
        }

        if (!empty($datagridName)) {
            $this->_datagridName = $datagridName;
        }

        $class = '';
        if (!empty($this->_datagridClass)) {
            $class = join(' ', $this->_datagridClass);
        }

        $this->_datagridContent = '<table id="tableDatagrid" title="' . $this->_datagridName . '" class="tablesorter footable ' . $class . '">' . self::$EOL;
        $this->_datagridContent .= $this->gridHeaderBuild();
        $this->_datagridContent .= $this->gridFooterBuild();
        $this->_datagridContent .= $this->gridBodyBuild();
        $this->_datagridContent .= '</table>';

        return $this;
    }
102933
public function provider($name, $provider)
    {
        if (!is_array($provider) && is_callable($provider)) {
            $provider = [$provider];
        }
        if (!is_array($provider)) {
            throw new DependencyException(
                'Invalid provider passed to '.$name.', '.
                'it must be an array or a callable function.'
            );
        }

        $dependencies = $provider;
        $value = array_pop($dependencies);

        return $this->set($name, new Dependency($value, $name, $dependencies));
    }
415312
public static function create($namespace = null, $name = null)
    {
        if (null === $namespace) {
            return self::createNamespacelessUuid();
        }

        return self::createNamespacedUuid($namespace, $name);
    }
15723
public static function create(ProviderRepository $providerRepository = null)
    {
        $container = new Container(
            $providerRepository
        );


        if (!$container->isProvided(AnnotationServiceProvider::class)) {
            $container->addProvider(AnnotationServiceProvider::class);
        }

        $container->add(
            Container::class,
            function () use ($container) {
                return $container;
            }
        )->alias(ContainerInterface::class);

        return $container;
    }