Gets the concrete of an abstract.

@since  5.0.0
@access protected
@param  string    $abstract
@return mixed
491299
protected function getConcrete( $abstract ) {

		$concrete = false;
		$abstract = $this->getAbstract( $abstract );

		if ( $this->has( $abstract ) ) {
			$concrete = $this->bindings[ $abstract ]['concrete'];
		}

		return $concrete ?: $abstract;
	}
945151
public function makeModel($abstract)
    {
        if (isset($this->Mo[$abstract])) {
            return $this->Mo[$abstract];
        }
        if(!class_exists($abstract)){
            //没有找到执行方法
            //执行404;
            echo '<br>Miss file : <br>';
            echo $abstract;
            D();
        }
        //检查类文件是否存在
        $this->Mo[$abstract] = new $abstract();     //模型存储

        return $this->Mo[$abstract];
    }
409973
public function getInterface($implementation)
    {
        return isset($this->interfaces[$implementation])
            ? $this->interfaces[$implementation]
            : false;
    }
781924
public function make($abstract, $vars = [], $newInstance = false) {
        if (isset($this->instances[$abstract])) {
            $object = $this->instances[$abstract];
        } else {
            if (isset($this->bind[$abstract])) {
                $concrete = $this->bind[$abstract];
                $object = $this->makeObject($concrete, $vars);
            } else {
                //正则绑定
                $result = preg_filter(array_keys($this->regexBind), array_values($this->regexBind), $abstract);
                if ($result) {
                    $concrete = is_array($result) ? end($result) : $result;
                    $object = $this->makeObject($concrete, $vars);
                } else {
                    $object = $this->invokeClass($abstract, $vars);
                }
            }

            if (!$newInstance) {
                $this->instances[$abstract] = $object;
            }
        }
        return $object;
    }
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;
            }
        }
    }
917408
public function get($columns = array('*'))
    {
        if (! is_null($this->cacheMinutes)) return $this->getCached($columns);

        return $this->getFresh($columns);
    }
267013
public function bindIf($abstract, $concrete, $shared = false)
    {
        if ( ! isset($this->bindings[$abstract]) && ! isset($this->instances[$abstract])) {
            $this->bind($abstract, $concrete, $shared);
        }
    }
677609
public function make($abstract, $parameters = [])
    {
        $abstract = ucfirst($abstract);
        if (isset($this->Instances[$abstract])) {
            return $this->Instances[$abstract];
        }
        //未定义的服务类 返回空值;
        if (!isset($this->Providers[$abstract])) {
            return null;
        }
        // echo $abstract;
        $parameters = $parameters ?: isset($this->ObjectConfig[$abstract]) ? $this->ObjectConfig[$abstract] : [];
        $this->Instances[$abstract] = $this->build($abstract, $parameters);
        return $this->Instances[$abstract];
    }
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;

    }
1220454
public function bind(string $abstract, $concrete = null, array $arguments = []): self
    {
        $this->data->bind($abstract, $concrete, $arguments);

        return $this;
    }
1150618
public function instance($abstract, $instance)
		{
			// First, we will extract the alias from the abstract if it is an array so we
			// are using the correct name when binding the type. If we get an alias it
			// will be registered with the container so we can resolve it out later.
			if (Arrays::is($abstract)) {
				list($abstract, $alias) = $this->extractAlias($abstract);
				$this->alias($abstract, $alias);
			}

			unset($this->aliases[$abstract]);

			// We'll check to determine if this type has been bound before, and if it has
			// we will fire the rebound callbacks registered with the container and it
			// can be updated with consuming classes that have gotten resolved here.
			$bound = $this->bound($abstract);
			$this->instances[$abstract] = $instance;
			if ($bound) {
				$this->rebound($abstract);
			}
		}
926396
public function getBuilder(AbstractModel $model): ?AbstractBuilder {
		if ($model instanceof PhpClass) {
			return $this->classBuilder;
		}

		if ($model instanceof PhpConstant) {
			return $this->constantBuilder;
		}

		if ($model instanceof PhpFunction) {
			return $this->functionBuilder;
		}

		if ($model instanceof PhpInterface) {
			return $this->interfaceBuilder;
		}

		if ($model instanceof PhpMethod) {
			return $this->methodBuilder;
		}

		if ($model instanceof PhpParameter) {
			return $this->parameterBuilder;
		}

		if ($model instanceof PhpProperty) {
			return $this->propertyBuilder;
		}

		if ($model instanceof PhpTrait) {
			return $this->traitBuilder;
		}

		return null;
	}
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;
    }
730840
public function resolved($abstract)
    {
        if ($this->isAlias($abstract)) {
            $abstract = $this->getAlias($abstract);
        }

        return isset($this->resolved[$abstract]) ||
               isset($this->instances[$abstract]);
    }
898783
public function build($concrete)
    {
        $reflection = new \ReflectionClass($concrete);

        if (! $reflection->isInstantiable()) {
            throw new \InvalidArgumentException(sprintf('Class %s is not instantiable.', $concrete));
        }

        $constructor = $reflection->getConstructor();

        if (is_null($constructor)) {
            return new $concrete;
        }

        $dependencies = $this->getDependencies($constructor);

        return $reflection->newInstanceArgs($dependencies);
    }
863555
public function bindIf($abstract, $concrete = null, $shared = false)
    {
        if (! $this->bound($abstract)) {
            $this->bind($abstract, $concrete, $shared);
        }
    }
1227526
protected function resolveClass(string $concrete)
    {
        $resolved   = $this->resolveArguments($this->arguments);
        $reflection = new ReflectionClass($concrete);

        return $reflection->newInstanceArgs($resolved);
    }