Get the concrete type for a given abstract.

@param  string  $abstract
@return mixed   $concrete
976189
protected function getConcrete($abstract)
    {
        if (! is_null($concrete = $this->getContextualConcrete($abstract))) {
            return $concrete;
        }

        // If we don't have a registered resolver or concrete for the type, we'll just
        // assume each type is a concrete name and will attempt to resolve it as is
        // since the container should be able to resolve concretes automatically.
        if (isset($this->bindings[$abstract])) {
            return $this->bindings[$abstract]['concrete'];
        }

        return $abstract;
    }
538962
public function bound($abstract)
    {
        $abstract = $this->normalize($abstract);
        return isset($this->bindings[$abstract]) || isset($this->instances[$abstract]) || $this->isAlias($abstract);
    }
413949
protected function getType($type)
    {
        if (isset($this->typeAlias[$type])) {
            return $this->typeAlias[$type];
        }

        return $type;
    }
1135317
protected function getConcrete($abstract)
	{
		if ( ! is_null($concrete = $this->getContextualConcrete($abstract)))
		{
			return $concrete;
		}

		// If we don't have a registered resolver or concrete for the type, we'll just
		// assume each type is a concrete name and will attempt to resolve it as is
		// since the container should be able to resolve concretes automatically.
		if ( ! isset($this->bindings[$abstract]))
		{
			if ($this->missingLeadingSlash($abstract) &&
				isset($this->bindings['\\'.$abstract]))
			{
				$abstract = '\\'.$abstract;
			}

			return $abstract;
		}

		return $this->bindings[$abstract]['concrete'];
	}
276584
public function bind(string $scope, string $abstract, string $concrete)
    {
        $this->validateScope(__METHOD__, $scope);

        if ($scope === self::SCOPE_INSTANCE_PER_RESOLVE) {
            $this->container->bind($abstract, $concrete);
        } else {
            $this->container->singleton($abstract, $concrete);
        }
    }
161176
public function getAssetType(string $assetType) : AssetTypeInterface
    {
        if (!isset($this->assetTypes[$assetType])) {
            if (isset($this->assetTypesArray[$assetType])) {
                $this->assetTypes[$assetType] = ImmutableAssetType::fromArray($assetType, $this->assetTypesArray[$assetType]);
            } else {
                $this->assetTypes[$assetType] = ImmutableAssetType::fromArray($assetType, []);
            }
        }
        return $this->assetTypes[$assetType];
    }
424839
public function bind($abstract, $concrete = null) {
        if (is_array($abstract)) {
            $this->bind = array_merge($this->bind, $abstract);
        } else {
            $this->bind[$abstract] = $concrete;
        }
    }
1301094
public function get($abstract)
    {
        /**
         * @todo validate that $abstract is a string
         */

        if (!isset($this->definitions[$abstract])) {

            $this->definitions[$abstract] = new Definition($this);
        }

        return $this->definitions[$abstract];
    }
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
670606
protected function build($type)
    {
        if ($concrete = array_get($this->aliases, $type)) {
            return $this->resolved[$type] = new $concrete($this);
        }

        throw new InternalServerErrorException;
    }
1338336
public function getRepository($abstract) {
        $entityClass = $this->repositoryNameParser
            ->convertRepositoryNameToEntityName($abstract);

        if ( ! class_exists($entityClass)) {
            throw new RepositoryNotFoundException(s(
                'Could not find repository "%s", ' .
                'with derived entity class "%s".',
                $abstract, $entityClass
            ));
        }

        return $this->objectManager->getRepository($entityClass);
    }
395206
public function getConstructorArguments($abstract)
    {
        //Strip all leading backslashes
        if ($abstract[0] === '\\') {
            $abstract = substr($abstract, 1);
        }

        $concrete = $this->findMostConcreteDefinition($abstract);
        if (!isset($this->constructorArguments[$concrete])) {
            $this->constructorArguments[$concrete] = [];
        }

        return $this->constructorArguments[$concrete];
    }
1211937
protected function getContextualConcrete($abstract)
    {
        if (! is_null($binding = $this->findInContextualBindings($abstract))) {
            return $binding;
        }

        // Next we need to see if a contextual binding might be bound under an alias of the
        // given abstract type. So, we will need to check if any aliases exist with this
        // type and then spin through them and check for contextual bindings on these.
        if (empty($this->abstractAliases[$abstract])) {
            return;
        }

        foreach ($this->abstractAliases[$abstract] as $alias) {
            if (! is_null($binding = $this->findInContextualBindings($alias))) {
                return $binding;
            }
        }
    }
1349736
public function resolve(string $abstract)
    {
        $concrete = null;

        try {
            $concrete = $this->getContainer()
                ->make($abstract);
        } catch (ReflectionException $exception) {
            // ..
        } catch (BindingResolutionException $exception) {
            // ..
        } catch (NotFoundExceptionInterface $exception) {
            // ..
        }

        return $concrete;
    }
1054861
protected function convertParameters($abstract, array $parameters)
    {

        // TODO Ugly hack to get the concrete class in laravel
        $concrete = Cheat::call($this->laravel, 'getConcrete', [$abstract]);

        if ($concrete instanceof Closure) {
            return $parameters;
        }

        $constructor = (new ReflectionClass($concrete))->getConstructor();

        $named = [];

        foreach ($constructor->getParameters() as $i=>$parameter) {
            if (isset($parameters[$i])) {
                $named[$parameter->getName()] = $parameters[$i];
            }
        }

        return $named;

    }
636448
private function getBlockInfo(\Magento\Framework\View\Element\AbstractBlock $block)
    {
        $result = self::filterEscapeEncode([
            'info' => [
                'nameInLayout' => $block->getNameInLayout(),
                'moduleName' => $block->getModuleName(),
                'phpClass' => $this->getBlockClass($block),
            ],
            'extra' => [
                'cacheKeyInfo' => $block->getCacheKeyInfo()
            ],
            'paths' => [
                'template' => $block->getTemplateFile(),
            ] + $this->getBlockPaths($block)
        ]);

        return $result;
    }
772159
public static function get(string $type): AbstractWriter
    {
        if (!\array_key_exists($type, static::$invokableClasses)) {
            throw new InvalidArgumentException('Unsupported config file type: '.$type);
        }

        return new static::$invokableClasses[$type];
    }