Get an asset container instance.

<code>
// Get the default asset container
$container = Asset::container();

// Get a named asset container
$container = Asset::container('footer');
</code>

@param  string            $container
@return AssetContainer
482134
public static function container($container = 'default')
	{
		if ( ! isset(static::$containers[$container]))
		{
			static::$containers[$container] = new AssetContainer($container);
		}

		return static::$containers[$container];
	}
260516
public function get (Asset $asset) : Asset
    {
        $cache = $this->locator->get(AssetsCache::class);
        $cachedAsset = $cache->get($asset);

        if (null !== $cachedAsset)
        {
            return $cachedAsset;
        }

        return $this->addAsset($asset);
    }
793173
public function getAsset($asset)
    {
        if (!isset($this->assetCache[$asset])) {
            $this->assetCache[$asset] = $this->assetRepository->createAsset($asset);
        }
        return $this->assetCache[$asset];
    }
365368
public function container($container = null)
    {
        if (is_null($container)) {
            return $this->factory->getContainer();
        }
        else {
            $this->factory->share($name, $handler);
            return null;
        }
    }
941288
protected function getContainer($name)
    {
        if (!isset($this->containers[$name])) {
            $this->createContainer($name);
        }

        return $this->containers[$name];
    }
1305110
public static function create($class, ContainerAwareInterface $container) : Asset
    {
        (new $class($a = new Asset($container)))->register();

        return static::$asset = $a;
    }
905342
public function provideBusinessLayerDependencies(Container $container)
    {
        $container[self::TWIG_EXTENSIONS] = function () {
            return $this->getTwigExtensions();
        };

        $container[self::TWIG_FILTERS] = function () {
            return $this->getTwigFilters();
        };

        $container[self::TWIG_FUNCTIONS] = function () {
            return $this->getTwigFunctions();
        };

        return parent::provideBusinessLayerDependencies($container);
    }
1877
public function providePersistenceLayerDependencies(Container $container): Container
    {
        $container = parent::providePersistenceLayerDependencies($container);
        $container = $this->addProductListPropelQuery($container);

        return $container;
    }
217618
public function provideBusinessLayerDependencies(Container $container)
    {
        $container = parent::provideBusinessLayerDependencies($container);

        $container = $this->addMerchantRelationshipSalesOrderThresholdFacade($container);
        $container = $this->addMerchantRelationshipFacade($container);
        $container = $this->addStoreFacade($container);
        $container = $this->addCurrencyFacade($container);

        return $container;
    }
1234520
public static function make(ContainerAwareInterface $container, Closure $callback = null)
    {
        $collection = new AssetCollection(new Asset($container));

        if (is_null($callback)) {
            return $collection->asset();
        }

        return $callback($collection);
    }
579879
public static function getContainerInstance() : Container
    {
        if (self::$container === null) {
            self::$container = self::getUnboundContainerInstance();
        }

        return self::$container;
    }
1276700
public static function setDefaultServices($container)
    {
        $project_root = self::projectRoot();

        $container
            ->share('projectXTemplate', \Droath\ProjectX\Template\TemplateManager::class);
        $container
            ->share('projectXGitHubUserAuth', \Droath\ProjectX\Service\GitHubUserAuthStore::class);
        $container
            ->share('projectXHostChecker', \Droath\ProjectX\Service\HostChecker::class);
        $container
            ->add('projectXEngine', function () use ($container) {
                return (new \Droath\ProjectX\Engine\EngineTypeFactory(
                    $container->get('projectXEngineResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXEngineResolver', \Droath\ProjectX\Engine\EngineTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXProject', function () use ($container) {
                return (new \Droath\ProjectX\Project\ProjectTypeFactory(
                    $container->get('projectXProjectResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXProjectResolver', \Droath\ProjectX\Project\ProjectTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXPlatform', function () use ($container) {
                return (new PlatformTypeFactory(
                    $container->get('projectXPlatformResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXPlatformResolver', PlatformTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->share('projectXFilesystemCache', \Symfony\Component\Cache\Adapter\FilesystemAdapter::class)
            ->withArguments(['', 0, "$project_root/.project-x/cache"]);
    }
1193553
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);

        $container = $this->addConditionalAvailabilityClient($container);

        return $container;
    }
37192
public function register(Container $container)
    {
        $container->prepareSharedObject(AssetManager::class);
        $container->prepareSharedObject(ScriptManager::class);

        AbstractScript::$instance = function () use ($container) {
            return $container->get(ScriptManager::class);
        };
    }
587039
public static function getContainer() : ?ContainerInterface
    {
        if (is_null(self::$container)) {
            self::setContainer(self::getDefaultContainer());
        }

        return self::$container;
    }
893486
public static function get($abstract)
    {
        if (!isset(self::getInstance()->containers[$abstract])) {
            try {
                $reflect = new ReflectionClass(self::getInstance()->bind[$abstract]);
            } catch (ReflectionException $e) {
                throw new ContainerException('Cannot find "' . $abstract . '" in container');
            }

            self::set($abstract, $reflect->newInstanceArgs([]));
        }

        return self::getInstance()->containers[$abstract];
    }
1329849
public function getContainerTypes($container)
    {
        if (isset($this->types[$container])) {
            return $this->types[$container];
        }

        return $this->defaultTypes;
    }