Get container.

@access  public
@param   string  $name
@return  Container
190938
public static function get($name = null)
    {
        if ($name === null) {
            $name = array_shift(array_keys(self::$containers));
        }
        return self::$containers[$name] ? self::$containers[$name] : null;
    }
502496
protected function prepareContainerName($name = '')
    {
        $name = (string)$name;

        if (empty($name)) {
            return $this->defaultContainerName;
        }

        return $name;
    }
188071
public static function getContainer()
    {
        if (!(self::$container instanceof Container)) {
            self::$container = new Container();
            self::$container->load();
        }

        return self::$container;
    }
22119
public static function get($name)
    {
        $class = get_called_class();
    
        if (!isset(self::$instance[$class])) {
            self::$instance[$class] = new static();
        }
        
        return self::$instance[$class]->getExtensions()->get($name);
    }
752096
public function get($name)
    {
        $name = ltrim($name, '\\');
        if (! isset($this->instances[$name])) {
            $this->instances[$name] = $this->newInstance($name);
        }
        return $this->instances[$name];
    }
1152649
public static function factory($name = null, $profile = null)
    {
        $profile = $profile ?: self::$profile;

        $profile = strtolower(StringNormalise::toDashSeparated($profile));

        // Get Root container.
        if (!isset(self::$instances[$profile])) {
            $container = new Container();

            $container->name    = 'windwalker.root';
            $container->profile = $profile;

            self::$instances[$profile] = $container;
        }

        $mainContainer = self::$instances[$profile];

        if (!$name) {
            return $mainContainer;
        }

        if (!$mainContainer->hasChild($name)) {
            $subContainer = $mainContainer->createChild($name);

            $subContainer->name    = $name;
            $subContainer->profile = $profile;
        }

        return $mainContainer->getChild($name);
    }
615035
public static function getContainer()
    {
        if (!self::$container) {
            self::$container = new ServiceContainer();
            self::provideServices();
        }
        return self::$container;
    }
119107
public function getParameter($name, $default = null)
    {
        if (!$this->getContainer()->hasParameter($name)) {
            return $default;
        }

        return $this->getContainer()->getParameter($name);
    }
254611
final public function get(string $name)
    {
        $service_selected = null;
        foreach ($this->services as $one => $val) {
            if ($val['name'] === $name) {
                if (!in_array($val['content']->status, array("enabled", "disabled"))) {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "Undefined status [ ".$val['content']->status." ] for ".$val['name']." service",
                        "solution" => "Please set the status [disabled] or [enabled]")));
                }
                if ($val['content']->status == "disabled") {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "The service [ ".$val['name']." ] is currently disabled ",
                        "solution" => "Please set the status [enabled] to enable the service")));
                }
                $i = $val['content']->namespace;
                $container = FrameworkContainer::getInstance();
                return ($container->get($i));
            }
        }

        throw new Server500(new \ArrayObject(array("explain" =>
            "Undefined service : $name", "solution" => "Please register the [$name] service")));
    }
1190898
public function get($name, $default = null)
    {
        if (isset($this->container[$name])) {
            return $this->container[$name];
        }

        return $default;
    }
620093
public function getPackageContainer($name) {
		if (!isset($this->packages[$name])) {
			$newPackageContainer = new MoufPackageVersionsContainer();
			$this->packages[$name] = $newPackageContainer;
		}
		return $this->packages[$name];
	}
638947
public function getContainer()
    {
        if (is_null(self::$container)) {
            self::$container = $this->checkContainer();
        }
        return self::$container;
    }
316989
public function get($name)
    {
        if ($this->exists($name)) {
            return $this->container[$name];
        } else {
            throw new RuntimeException(sprintf('Attempted to retrieve non-existing dependency "%s"', $name));
        }
    }
365698
public function get($name)
    {
        if ($this->flowCache->has($name)) {
            $this->flowCache->requireOnce($name);
        }

        return $this->flowCache->getWrapped($name);
    }
235217
public function get($name)
    {
        try {
            return \strpos($name, '.') === false
                ? parent::get($name)
                : $this->getRecursive($name);
        } catch (NotFoundException $exception) {
            throw new ContainerValueNotFoundException(
                \sprintf('No entry or class found for "%s"', $name),
                $exception->getCode(),
                $exception
            );
        } catch (\Throwable $exception) {
            throw new ContainerException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
733895
public function get(string $name): AbstractCommand
	{
		if (!$this->has($name))
		{
			throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
		}

		return $this->container->get($this->commandMap[$name]);
	}
432485
protected function get($name)
    {
        return isset($this->repositories[$name]) ? $this->repositories[$name] : $this->resolve($name);
    }