This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Components/DependencyInjection/Loader/Loader.php

35 lines
890 B
PHP
Raw Normal View History

2010-01-04 14:26:20 +00:00
<?php
namespace Symfony\Components\DependencyInjection\Loader;
/*
* This file is part of the symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
* Loader is the abstract class used by all built-in loaders.
*
* @package symfony
* @subpackage dependency_injection
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
abstract class Loader implements LoaderInterface
{
static protected $extensions = array();
static public function registerExtension(LoaderExtensionInterface $extension)
{
static::$extensions[$extension->getNamespace()] = $extension;
}
static public function getExtension($name)
{
return isset(static::$extensions[$name]) ? static::$extensions[$name] : null;
}
}