[DependencyInjection] tagged the public @api

This commit is contained in:
Fabien Potencier 2011-07-20 10:50:27 +02:00
parent b36c002fa4
commit 97cb35b47a
25 changed files with 404 additions and 0 deletions

View File

@ -11,6 +11,9 @@
namespace Symfony\Component\DependencyInjection; namespace Symfony\Component\DependencyInjection;
/**
* @api
*/
class Alias class Alias
{ {
private $id; private $id;
@ -21,6 +24,8 @@ class Alias
* *
* @param string $id Alias identifier * @param string $id Alias identifier
* @param Boolean $public If this alias is public * @param Boolean $public If this alias is public
*
* @api
*/ */
public function __construct($id, $public = true) public function __construct($id, $public = true)
{ {
@ -32,6 +37,8 @@ class Alias
* Checks if this DI Alias should be public or not. * Checks if this DI Alias should be public or not.
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function isPublic() public function isPublic()
{ {
@ -42,6 +49,8 @@ class Alias
* Sets if this Alias is public. * Sets if this Alias is public.
* *
* @param Boolean $boolean If this Alias should be public * @param Boolean $boolean If this Alias should be public
*
* @api
*/ */
public function setPublic($boolean) public function setPublic($boolean)
{ {
@ -52,6 +61,8 @@ class Alias
* Returns the Id of this alias. * Returns the Id of this alias.
* *
* @return string The alias id * @return string The alias id
*
* @api
*/ */
public function __toString() public function __toString()
{ {

View File

@ -18,6 +18,8 @@ use Symfony\Component\DependencyInjection\Compiler\PassConfig;
* This class is used to remove circular dependencies between individual passes. * This class is used to remove circular dependencies between individual passes.
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class Compiler class Compiler
{ {
@ -41,6 +43,8 @@ class Compiler
* Returns the PassConfig. * Returns the PassConfig.
* *
* @return PassConfig The PassConfig instance * @return PassConfig The PassConfig instance
*
* @api
*/ */
public function getPassConfig() public function getPassConfig()
{ {
@ -51,6 +55,8 @@ class Compiler
* Returns the ServiceReferenceGraph. * Returns the ServiceReferenceGraph.
* *
* @return ServiceReferenceGraph The ServiceReferenceGraph instance * @return ServiceReferenceGraph The ServiceReferenceGraph instance
*
* @api
*/ */
public function getServiceReferenceGraph() public function getServiceReferenceGraph()
{ {
@ -72,6 +78,8 @@ class Compiler
* *
* @param CompilerPassInterface $pass A compiler pass * @param CompilerPassInterface $pass A compiler pass
* @param string $type The type of the pass * @param string $type The type of the pass
*
* @api
*/ */
public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
{ {
@ -102,6 +110,8 @@ class Compiler
* Run the Compiler and process all Passes. * Run the Compiler and process all Passes.
* *
* @param ContainerBuilder $container * @param ContainerBuilder $container
*
* @api
*/ */
public function compile(ContainerBuilder $container) public function compile(ContainerBuilder $container)
{ {

View File

@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
* Interface that must be implemented by compilation passes * Interface that must be implemented by compilation passes
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
interface CompilerPassInterface interface CompilerPassInterface
{ {
@ -25,6 +27,8 @@ interface CompilerPassInterface
* *
* @param ContainerBuilder $container * @param ContainerBuilder $container
* @return void * @return void
*
* @api
*/ */
function process(ContainerBuilder $container); function process(ContainerBuilder $container);
} }

View File

@ -17,6 +17,8 @@ namespace Symfony\Component\DependencyInjection\Compiler;
* This class has a default configuration embedded. * This class has a default configuration embedded.
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class PassConfig class PassConfig
{ {
@ -73,6 +75,8 @@ class PassConfig
* Returns all passes in order to be processed. * Returns all passes in order to be processed.
* *
* @return array An array of all passes to process * @return array An array of all passes to process
*
* @api
*/ */
public function getPasses() public function getPasses()
{ {
@ -92,6 +96,8 @@ class PassConfig
* @param CompilerPassInterface $pass A Compiler pass * @param CompilerPassInterface $pass A Compiler pass
* @param string $type The pass type * @param string $type The pass type
* @throws \InvalidArgumentException when a pass type doesn't exist * @throws \InvalidArgumentException when a pass type doesn't exist
*
* @api
*/ */
public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION) public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION)
{ {
@ -108,6 +114,8 @@ class PassConfig
* Gets all passes for the AfterRemoving pass. * Gets all passes for the AfterRemoving pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getAfterRemovingPasses() public function getAfterRemovingPasses()
{ {
@ -118,6 +126,8 @@ class PassConfig
* Gets all passes for the BeforeOptimization pass. * Gets all passes for the BeforeOptimization pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getBeforeOptimizationPasses() public function getBeforeOptimizationPasses()
{ {
@ -128,6 +138,8 @@ class PassConfig
* Gets all passes for the BeforeRemoving pass. * Gets all passes for the BeforeRemoving pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getBeforeRemovingPasses() public function getBeforeRemovingPasses()
{ {
@ -138,6 +150,8 @@ class PassConfig
* Gets all passes for the Optimization pass. * Gets all passes for the Optimization pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getOptimizationPasses() public function getOptimizationPasses()
{ {
@ -148,6 +162,8 @@ class PassConfig
* Gets all passes for the Removing pass. * Gets all passes for the Removing pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getRemovingPasses() public function getRemovingPasses()
{ {
@ -158,6 +174,8 @@ class PassConfig
* Gets all passes for the Merge pass. * Gets all passes for the Merge pass.
* *
* @return array An array of passes * @return array An array of passes
*
* @api
*/ */
public function getMergePass() public function getMergePass()
{ {
@ -168,6 +186,8 @@ class PassConfig
* Sets the Merge Pass. * Sets the Merge Pass.
* *
* @param CompilerPassInterface $pass The merge pass * @param CompilerPassInterface $pass The merge pass
*
* @api
*/ */
public function setMergePass(CompilerPassInterface $pass) public function setMergePass(CompilerPassInterface $pass)
{ {
@ -178,6 +198,8 @@ class PassConfig
* Sets the AfterRemoving passes. * Sets the AfterRemoving passes.
* *
* @param array $passes An array of passes * @param array $passes An array of passes
*
* @api
*/ */
public function setAfterRemovingPasses(array $passes) public function setAfterRemovingPasses(array $passes)
{ {
@ -188,6 +210,8 @@ class PassConfig
* Sets the BeforeOptimization passes. * Sets the BeforeOptimization passes.
* *
* @param array $passes An array of passes * @param array $passes An array of passes
*
* @api
*/ */
public function setBeforeOptimizationPasses(array $passes) public function setBeforeOptimizationPasses(array $passes)
{ {
@ -198,6 +222,8 @@ class PassConfig
* Sets the BeforeRemoving passes. * Sets the BeforeRemoving passes.
* *
* @param array $passes An array of passes * @param array $passes An array of passes
*
* @api
*/ */
public function setBeforeRemovingPasses(array $passes) public function setBeforeRemovingPasses(array $passes)
{ {
@ -208,6 +234,8 @@ class PassConfig
* Sets the Optimization passes. * Sets the Optimization passes.
* *
* @param array $passes An array of passes * @param array $passes An array of passes
*
* @api
*/ */
public function setOptimizationPasses(array $passes) public function setOptimizationPasses(array $passes)
{ {
@ -218,6 +246,8 @@ class PassConfig
* Sets the Removing passes. * Sets the Removing passes.
* *
* @param array $passes An array of passes * @param array $passes An array of passes
*
* @api
*/ */
public function setRemovingPasses(array $passes) public function setRemovingPasses(array $passes)
{ {

View File

@ -54,6 +54,8 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class Container implements ContainerInterface class Container implements ContainerInterface
{ {
@ -69,6 +71,8 @@ class Container implements ContainerInterface
* Constructor. * Constructor.
* *
* @param ParameterBagInterface $parameterBag A ParameterBagInterface instance * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance
*
* @api
*/ */
public function __construct(ParameterBagInterface $parameterBag = null) public function __construct(ParameterBagInterface $parameterBag = null)
{ {
@ -90,6 +94,8 @@ class Container implements ContainerInterface
* *
* * Parameter values are resolved; * * Parameter values are resolved;
* * The parameter bag is frozen. * * The parameter bag is frozen.
*
* @api
*/ */
public function compile() public function compile()
{ {
@ -102,6 +108,8 @@ class Container implements ContainerInterface
* Returns true if the container parameter bag are frozen. * Returns true if the container parameter bag are frozen.
* *
* @return Boolean true if the container parameter bag are frozen, false otherwise * @return Boolean true if the container parameter bag are frozen, false otherwise
*
* @api
*/ */
public function isFrozen() public function isFrozen()
{ {
@ -112,6 +120,8 @@ class Container implements ContainerInterface
* Gets the service container parameter bag. * Gets the service container parameter bag.
* *
* @return ParameterBagInterface A ParameterBagInterface instance * @return ParameterBagInterface A ParameterBagInterface instance
*
* @api
*/ */
public function getParameterBag() public function getParameterBag()
{ {
@ -126,6 +136,8 @@ class Container implements ContainerInterface
* @return mixed The parameter value * @return mixed The parameter value
* *
* @throws \InvalidArgumentException if the parameter is not defined * @throws \InvalidArgumentException if the parameter is not defined
*
* @api
*/ */
public function getParameter($name) public function getParameter($name)
{ {
@ -138,6 +150,8 @@ class Container implements ContainerInterface
* @param string $name The parameter name * @param string $name The parameter name
* *
* @return Boolean The presence of parameter in container * @return Boolean The presence of parameter in container
*
* @api
*/ */
public function hasParameter($name) public function hasParameter($name)
{ {
@ -149,6 +163,8 @@ class Container implements ContainerInterface
* *
* @param string $name The parameter name * @param string $name The parameter name
* @param mixed $value The parameter value * @param mixed $value The parameter value
*
* @api
*/ */
public function setParameter($name, $value) public function setParameter($name, $value)
{ {
@ -161,6 +177,8 @@ class Container implements ContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* @param object $service The service instance * @param object $service The service instance
* @param string $scope The scope of the service * @param string $scope The scope of the service
*
* @api
*/ */
public function set($id, $service, $scope = self::SCOPE_CONTAINER) public function set($id, $service, $scope = self::SCOPE_CONTAINER)
{ {
@ -187,6 +205,8 @@ class Container implements ContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* *
* @return Boolean true if the service is defined, false otherwise * @return Boolean true if the service is defined, false otherwise
*
* @api
*/ */
public function has($id) public function has($id)
{ {
@ -209,6 +229,8 @@ class Container implements ContainerInterface
* @throws \InvalidArgumentException if the service is not defined * @throws \InvalidArgumentException if the service is not defined
* *
* @see Reference * @see Reference
*
* @api
*/ */
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
{ {
@ -265,6 +287,8 @@ class Container implements ContainerInterface
* *
* @param string $name * @param string $name
* @return void * @return void
*
* @api
*/ */
public function enterScope($name) public function enterScope($name)
{ {
@ -309,6 +333,8 @@ class Container implements ContainerInterface
* @param string $name The name of the scope to leave * @param string $name The name of the scope to leave
* @return void * @return void
* @throws \InvalidArgumentException if the scope is not active * @throws \InvalidArgumentException if the scope is not active
*
* @api
*/ */
public function leaveScope($name) public function leaveScope($name)
{ {
@ -345,6 +371,8 @@ class Container implements ContainerInterface
* *
* @param ScopeInterface $scope * @param ScopeInterface $scope
* @return void * @return void
*
* @api
*/ */
public function addScope(ScopeInterface $scope) public function addScope(ScopeInterface $scope)
{ {
@ -376,6 +404,8 @@ class Container implements ContainerInterface
* *
* @param string $name The name of the scope * @param string $name The name of the scope
* @return Boolean * @return Boolean
*
* @api
*/ */
public function hasScope($name) public function hasScope($name)
{ {
@ -389,6 +419,8 @@ class Container implements ContainerInterface
* *
* @param string $name * @param string $name
* @return Boolean * @return Boolean
*
* @api
*/ */
public function isScopeActive($name) public function isScopeActive($name)
{ {

View File

@ -15,11 +15,15 @@ namespace Symfony\Component\DependencyInjection;
* A simple implementation of ContainerAwareInterface. * A simple implementation of ContainerAwareInterface.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class ContainerAware implements ContainerAwareInterface class ContainerAware implements ContainerAwareInterface
{ {
/** /**
* @var ContainerInterface * @var ContainerInterface
*
* @api
*/ */
protected $container; protected $container;
@ -27,6 +31,8 @@ class ContainerAware implements ContainerAwareInterface
* Sets the Container associated with this Controller. * Sets the Container associated with this Controller.
* *
* @param ContainerInterface $container A ContainerInterface instance * @param ContainerInterface $container A ContainerInterface instance
*
* @api
*/ */
public function setContainer(ContainerInterface $container = null) public function setContainer(ContainerInterface $container = null)
{ {

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* ContainerAwareInterface should be implemented by classes that depends on a Container. * ContainerAwareInterface should be implemented by classes that depends on a Container.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
interface ContainerAwareInterface interface ContainerAwareInterface
{ {
@ -22,6 +24,8 @@ interface ContainerAwareInterface
* Sets the Container. * Sets the Container.
* *
* @param ContainerInterface $container A ContainerInterface instance * @param ContainerInterface $container A ContainerInterface instance
*
* @api
*/ */
function setContainer(ContainerInterface $container = null); function setContainer(ContainerInterface $container = null);
} }

View File

@ -23,6 +23,8 @@ use Symfony\Component\Config\Resource\ResourceInterface;
* ContainerBuilder is a DI container that provides an API to easily describe services. * ContainerBuilder is a DI container that provides an API to easily describe services.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class ContainerBuilder extends Container implements TaggedContainerInterface class ContainerBuilder extends Container implements TaggedContainerInterface
{ {
@ -39,6 +41,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Registers an extension. * Registers an extension.
* *
* @param ExtensionInterface $extension An extension instance * @param ExtensionInterface $extension An extension instance
*
* @api
*/ */
public function registerExtension(ExtensionInterface $extension) public function registerExtension(ExtensionInterface $extension)
{ {
@ -55,6 +59,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $name An alias or a namespace * @param string $name An alias or a namespace
* *
* @return ExtensionInterface An extension instance * @return ExtensionInterface An extension instance
*
* @api
*/ */
public function getExtension($name) public function getExtension($name)
{ {
@ -73,6 +79,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns all registered extensions. * Returns all registered extensions.
* *
* @return array An array of ExtensionInterface * @return array An array of ExtensionInterface
*
* @api
*/ */
public function getExtensions() public function getExtensions()
{ {
@ -84,6 +92,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* *
* @param string $name The name of the extension * @param string $name The name of the extension
* @return Boolean If the extension exists * @return Boolean If the extension exists
*
* @api
*/ */
public function hasExtension($name) public function hasExtension($name)
{ {
@ -94,6 +104,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns an array of resources loaded to build this configuration. * Returns an array of resources loaded to build this configuration.
* *
* @return ResourceInterface[] An array of resources * @return ResourceInterface[] An array of resources
*
* @api
*/ */
public function getResources() public function getResources()
{ {
@ -106,6 +118,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param ResourceInterface $resource A resource instance * @param ResourceInterface $resource A resource instance
* *
* @return ContainerBuilder The current instance * @return ContainerBuilder The current instance
*
* @api
*/ */
public function addResource(ResourceInterface $resource) public function addResource(ResourceInterface $resource)
{ {
@ -118,6 +132,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Adds the object class hierarchy as resources. * Adds the object class hierarchy as resources.
* *
* @param object $object An object instance * @param object $object An object instance
*
* @api
*/ */
public function addObjectResource($object) public function addObjectResource($object)
{ {
@ -134,6 +150,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param array $values An array of values that customizes the extension * @param array $values An array of values that customizes the extension
* *
* @return ContainerBuilder The current instance * @return ContainerBuilder The current instance
*
* @api
*/ */
public function loadFromExtension($extension, array $values = array()) public function loadFromExtension($extension, array $values = array())
{ {
@ -153,6 +171,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* *
* @param CompilerPassInterface $pass A compiler pass * @param CompilerPassInterface $pass A compiler pass
* @param string $type The type of compiler pass * @param string $type The type of compiler pass
*
* @api
*/ */
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
{ {
@ -169,6 +189,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns the compiler pass config which can then be modified. * Returns the compiler pass config which can then be modified.
* *
* @return PassConfig The compiler pass config * @return PassConfig The compiler pass config
*
* @api
*/ */
public function getCompilerPassConfig() public function getCompilerPassConfig()
{ {
@ -183,6 +205,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns the compiler. * Returns the compiler.
* *
* @return Compiler The compiler * @return Compiler The compiler
*
* @api
*/ */
public function getCompiler() public function getCompiler()
{ {
@ -197,6 +221,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns all Scopes. * Returns all Scopes.
* *
* @return array An array of scopes * @return array An array of scopes
*
* @api
*/ */
public function getScopes() public function getScopes()
{ {
@ -207,6 +233,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Returns all Scope children. * Returns all Scope children.
* *
* @return array An array of scope children. * @return array An array of scope children.
*
* @api
*/ */
public function getScopeChildren() public function getScopeChildren()
{ {
@ -221,6 +249,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $scope The scope * @param string $scope The scope
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*
* @api
*/ */
public function set($id, $service, $scope = self::SCOPE_CONTAINER) public function set($id, $service, $scope = self::SCOPE_CONTAINER)
{ {
@ -239,6 +269,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Removes a service definition. * Removes a service definition.
* *
* @param string $id The service identifier * @param string $id The service identifier
*
* @api
*/ */
public function removeDefinition($id) public function removeDefinition($id)
{ {
@ -251,6 +283,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* *
* @return Boolean true if the service is defined, false otherwise * @return Boolean true if the service is defined, false otherwise
*
* @api
*/ */
public function has($id) public function has($id)
{ {
@ -271,6 +305,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @throws \LogicException if the service has a circular reference to itself * @throws \LogicException if the service has a circular reference to itself
* *
* @see Reference * @see Reference
*
* @api
*/ */
public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{ {
@ -327,6 +363,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* *
* @param ContainerBuilder $container The ContainerBuilder instance to merge. * @param ContainerBuilder $container The ContainerBuilder instance to merge.
* @throws \LogicException when this ContainerBuilder is frozen * @throws \LogicException when this ContainerBuilder is frozen
*
* @api
*/ */
public function merge(ContainerBuilder $container) public function merge(ContainerBuilder $container)
{ {
@ -357,6 +395,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $name The name of the extension * @param string $name The name of the extension
* *
* @return array An array of configuration * @return array An array of configuration
*
* @api
*/ */
public function getExtensionConfig($name) public function getExtensionConfig($name)
{ {
@ -380,6 +420,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* * Parameter values are resolved; * * Parameter values are resolved;
* * The parameter bag is frozen; * * The parameter bag is frozen;
* * Extension loading is disabled. * * Extension loading is disabled.
*
* @api
*/ */
public function compile() public function compile()
{ {
@ -412,6 +454,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Adds the service aliases. * Adds the service aliases.
* *
* @param array $aliases An array of aliases * @param array $aliases An array of aliases
*
* @api
*/ */
public function addAliases(array $aliases) public function addAliases(array $aliases)
{ {
@ -424,6 +468,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Sets the service aliases. * Sets the service aliases.
* *
* @param array $aliases An array of service definitions * @param array $aliases An array of service definitions
*
* @api
*/ */
public function setAliases(array $aliases) public function setAliases(array $aliases)
{ {
@ -436,6 +482,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* *
* @param string $alias The alias to create * @param string $alias The alias to create
* @param mixed $id The service to alias * @param mixed $id The service to alias
*
* @api
*/ */
public function setAlias($alias, $id) public function setAlias($alias, $id)
{ {
@ -460,6 +508,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Removes an alias. * Removes an alias.
* *
* @param string $alias The alias to remove * @param string $alias The alias to remove
*
* @api
*/ */
public function removeAlias($alias) public function removeAlias($alias)
{ {
@ -472,6 +522,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* *
* @return Boolean true if the alias exists, false otherwise * @return Boolean true if the alias exists, false otherwise
*
* @api
*/ */
public function hasAlias($id) public function hasAlias($id)
{ {
@ -482,6 +534,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Gets all defined aliases. * Gets all defined aliases.
* *
* @return array An array of aliases * @return array An array of aliases
*
* @api
*/ */
public function getAliases() public function getAliases()
{ {
@ -496,6 +550,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @return string The aliased service identifier * @return string The aliased service identifier
* *
* @throws \InvalidArgumentException if the alias does not exist * @throws \InvalidArgumentException if the alias does not exist
*
* @api
*/ */
public function getAlias($id) public function getAlias($id)
{ {
@ -518,6 +574,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $class The service class * @param string $class The service class
* *
* @return Definition A Definition instance * @return Definition A Definition instance
*
* @api
*/ */
public function register($id, $class = null) public function register($id, $class = null)
{ {
@ -528,6 +586,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Adds the service definitions. * Adds the service definitions.
* *
* @param Definition[] $definitions An array of service definitions * @param Definition[] $definitions An array of service definitions
*
* @api
*/ */
public function addDefinitions(array $definitions) public function addDefinitions(array $definitions)
{ {
@ -540,6 +600,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Sets the service definitions. * Sets the service definitions.
* *
* @param array $definitions An array of service definitions * @param array $definitions An array of service definitions
*
* @api
*/ */
public function setDefinitions(array $definitions) public function setDefinitions(array $definitions)
{ {
@ -551,6 +613,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* Gets all service definitions. * Gets all service definitions.
* *
* @return array An array of Definition instances * @return array An array of Definition instances
*
* @api
*/ */
public function getDefinitions() public function getDefinitions()
{ {
@ -564,6 +628,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param Definition $definition A Definition instance * @param Definition $definition A Definition instance
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*
* @api
*/ */
public function setDefinition($id, Definition $definition) public function setDefinition($id, Definition $definition)
{ {
@ -584,6 +650,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* *
* @return Boolean true if the service definition exists, false otherwise * @return Boolean true if the service definition exists, false otherwise
*
* @api
*/ */
public function hasDefinition($id) public function hasDefinition($id)
{ {
@ -598,6 +666,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @return Definition A Definition instance * @return Definition A Definition instance
* *
* @throws \InvalidArgumentException if the service definition does not exist * @throws \InvalidArgumentException if the service definition does not exist
*
* @api
*/ */
public function getDefinition($id) public function getDefinition($id)
{ {
@ -620,6 +690,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @return Definition A Definition instance * @return Definition A Definition instance
* *
* @throws \InvalidArgumentException if the service definition does not exist * @throws \InvalidArgumentException if the service definition does not exist
*
* @api
*/ */
public function findDefinition($id) public function findDefinition($id)
{ {
@ -742,6 +814,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* @param string $name The tag name * @param string $name The tag name
* *
* @return array An array of tags * @return array An array of tags
*
* @api
*/ */
public function findTaggedServiceIds($name) public function findTaggedServiceIds($name)
{ {

View File

@ -16,6 +16,8 @@ namespace Symfony\Component\DependencyInjection;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
interface ContainerInterface interface ContainerInterface
{ {
@ -31,6 +33,8 @@ interface ContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* @param object $service The service instance * @param object $service The service instance
* @param string $scope The scope of the service * @param string $scope The scope of the service
*
* @api
*/ */
function set($id, $service, $scope = self::SCOPE_CONTAINER); function set($id, $service, $scope = self::SCOPE_CONTAINER);
@ -45,6 +49,8 @@ interface ContainerInterface
* @throws \InvalidArgumentException if the service is not defined * @throws \InvalidArgumentException if the service is not defined
* *
* @see Reference * @see Reference
*
* @api
*/ */
function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
@ -54,6 +60,8 @@ interface ContainerInterface
* @param string $id The service identifier * @param string $id The service identifier
* *
* @return Boolean true if the service is defined, false otherwise * @return Boolean true if the service is defined, false otherwise
*
* @api
*/ */
function has($id); function has($id);
@ -65,6 +73,8 @@ interface ContainerInterface
* @return mixed The parameter value * @return mixed The parameter value
* *
* @throws \InvalidArgumentException if the parameter is not defined * @throws \InvalidArgumentException if the parameter is not defined
*
* @api
*/ */
function getParameter($name); function getParameter($name);
@ -74,6 +84,8 @@ interface ContainerInterface
* @param string $name The parameter name * @param string $name The parameter name
* *
* @return Boolean The presence of parameter in container * @return Boolean The presence of parameter in container
*
* @api
*/ */
function hasParameter($name); function hasParameter($name);
@ -82,6 +94,8 @@ interface ContainerInterface
* *
* @param string $name The parameter name * @param string $name The parameter name
* @param mixed $value The parameter value * @param mixed $value The parameter value
*
* @api
*/ */
function setParameter($name, $value); function setParameter($name, $value);
@ -90,6 +104,8 @@ interface ContainerInterface
* *
* @param string $name * @param string $name
* @return void * @return void
*
* @api
*/ */
function enterScope($name); function enterScope($name);
@ -98,6 +114,8 @@ interface ContainerInterface
* *
* @param string $name * @param string $name
* @return void * @return void
*
* @api
*/ */
function leaveScope($name); function leaveScope($name);
@ -106,6 +124,8 @@ interface ContainerInterface
* *
* @param ScopeInterface $scope * @param ScopeInterface $scope
* @return void * @return void
*
* @api
*/ */
function addScope(ScopeInterface $scope); function addScope(ScopeInterface $scope);
@ -114,6 +134,8 @@ interface ContainerInterface
* *
* @param string $name * @param string $name
* @return Boolean * @return Boolean
*
* @api
*/ */
function hasScope($name); function hasScope($name);
@ -124,6 +146,8 @@ interface ContainerInterface
* *
* @param string $name * @param string $name
* @return Boolean * @return Boolean
*
* @api
*/ */
function isScopeActive($name); function isScopeActive($name);
} }

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* Definition represents a service definition. * Definition represents a service definition.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class Definition class Definition
{ {
@ -39,6 +41,8 @@ class Definition
* *
* @param string $class The service class * @param string $class The service class
* @param array $arguments An array of arguments to pass to the service constructor * @param array $arguments An array of arguments to pass to the service constructor
*
* @api
*/ */
public function __construct($class = null, array $arguments = array()) public function __construct($class = null, array $arguments = array())
{ {
@ -60,6 +64,8 @@ class Definition
* @param string $factoryClass The factory class name * @param string $factoryClass The factory class name
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setFactoryClass($factoryClass) public function setFactoryClass($factoryClass)
{ {
@ -72,6 +78,8 @@ class Definition
* Gets the factory class. * Gets the factory class.
* *
* @return string The factory class name * @return string The factory class name
*
* @api
*/ */
public function getFactoryClass() public function getFactoryClass()
{ {
@ -84,6 +92,8 @@ class Definition
* @param string $factoryMethod The factory method name * @param string $factoryMethod The factory method name
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setFactoryMethod($factoryMethod) public function setFactoryMethod($factoryMethod)
{ {
@ -96,6 +106,8 @@ class Definition
* Gets the factory method. * Gets the factory method.
* *
* @return string The factory method name * @return string The factory method name
*
* @api
*/ */
public function getFactoryMethod() public function getFactoryMethod()
{ {
@ -108,6 +120,8 @@ class Definition
* @param string $factoryService The factory service id * @param string $factoryService The factory service id
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setFactoryService($factoryService) public function setFactoryService($factoryService)
{ {
@ -120,6 +134,8 @@ class Definition
* Gets the factory service id. * Gets the factory service id.
* *
* @return string The factory service id * @return string The factory service id
*
* @api
*/ */
public function getFactoryService() public function getFactoryService()
{ {
@ -132,6 +148,8 @@ class Definition
* @param string $class The service class * @param string $class The service class
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setClass($class) public function setClass($class)
{ {
@ -144,6 +162,8 @@ class Definition
* Sets the service class. * Sets the service class.
* *
* @return string The service class * @return string The service class
*
* @api
*/ */
public function getClass() public function getClass()
{ {
@ -156,6 +176,8 @@ class Definition
* @param array $arguments An array of arguments * @param array $arguments An array of arguments
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setArguments(array $arguments) public function setArguments(array $arguments)
{ {
@ -164,6 +186,9 @@ class Definition
return $this; return $this;
} }
/**
* @api
*/
public function setProperties(array $properties) public function setProperties(array $properties)
{ {
$this->properties = $properties; $this->properties = $properties;
@ -171,11 +196,17 @@ class Definition
return $this; return $this;
} }
/**
* @api
*/
public function getProperties() public function getProperties()
{ {
return $this->properties; return $this->properties;
} }
/**
* @api
*/
public function setProperty($name, $value) public function setProperty($name, $value)
{ {
$this->properties[$name] = $value; $this->properties[$name] = $value;
@ -189,6 +220,8 @@ class Definition
* @param mixed $argument An argument * @param mixed $argument An argument
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function addArgument($argument) public function addArgument($argument)
{ {
@ -204,6 +237,8 @@ class Definition
* @param mixed $argument * @param mixed $argument
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function replaceArgument($index, $argument) public function replaceArgument($index, $argument)
{ {
@ -220,6 +255,8 @@ class Definition
* Gets the arguments to pass to the service constructor/factory method. * Gets the arguments to pass to the service constructor/factory method.
* *
* @return array The array of arguments * @return array The array of arguments
*
* @api
*/ */
public function getArguments() public function getArguments()
{ {
@ -232,6 +269,8 @@ class Definition
* @param integer $index * @param integer $index
* *
* @return mixed The argument value * @return mixed The argument value
*
* @api
*/ */
public function getArgument($index) public function getArgument($index)
{ {
@ -248,6 +287,8 @@ class Definition
* @param array $calls An array of method calls * @param array $calls An array of method calls
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setMethodCalls(array $calls = array()) public function setMethodCalls(array $calls = array())
{ {
@ -266,6 +307,8 @@ class Definition
* @param array $arguments An array of arguments to pass to the method call * @param array $arguments An array of arguments to pass to the method call
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function addMethodCall($method, array $arguments = array()) public function addMethodCall($method, array $arguments = array())
{ {
@ -280,6 +323,8 @@ class Definition
* @param string $method The method name to remove * @param string $method The method name to remove
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function removeMethodCall($method) public function removeMethodCall($method)
{ {
@ -299,6 +344,8 @@ class Definition
* @param string $method The method name to search for * @param string $method The method name to search for
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function hasMethodCall($method) public function hasMethodCall($method)
{ {
@ -315,6 +362,8 @@ class Definition
* Gets the methods to call after service initialization. * Gets the methods to call after service initialization.
* *
* @return array An array of method calls * @return array An array of method calls
*
* @api
*/ */
public function getMethodCalls() public function getMethodCalls()
{ {
@ -327,6 +376,8 @@ class Definition
* @param array $tags * @param array $tags
* *
* @return Definition the current instance * @return Definition the current instance
*
* @api
*/ */
public function setTags(array $tags) public function setTags(array $tags)
{ {
@ -339,6 +390,8 @@ class Definition
* Returns all tags. * Returns all tags.
* *
* @return array An array of tags * @return array An array of tags
*
* @api
*/ */
public function getTags() public function getTags()
{ {
@ -351,6 +404,8 @@ class Definition
* @param string $name The tag name * @param string $name The tag name
* *
* @return array An array of attributes * @return array An array of attributes
*
* @api
*/ */
public function getTag($name) public function getTag($name)
{ {
@ -364,6 +419,8 @@ class Definition
* @param array $attributes An array of attributes * @param array $attributes An array of attributes
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function addTag($name, array $attributes = array()) public function addTag($name, array $attributes = array())
{ {
@ -378,6 +435,8 @@ class Definition
* @param string $name * @param string $name
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function hasTag($name) public function hasTag($name)
{ {
@ -388,6 +447,8 @@ class Definition
* Clears the tags for this definition. * Clears the tags for this definition.
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function clearTags() public function clearTags()
{ {
@ -402,6 +463,8 @@ class Definition
* @param string $file A full pathname to include * @param string $file A full pathname to include
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setFile($file) public function setFile($file)
{ {
@ -414,6 +477,8 @@ class Definition
* Gets the file to require before creating the service. * Gets the file to require before creating the service.
* *
* @return string The full pathname to include * @return string The full pathname to include
*
* @api
*/ */
public function getFile() public function getFile()
{ {
@ -426,6 +491,8 @@ class Definition
* @param string $scope Whether the service must be shared or not * @param string $scope Whether the service must be shared or not
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setScope($scope) public function setScope($scope)
{ {
@ -438,6 +505,8 @@ class Definition
* Returns the scope of the service * Returns the scope of the service
* *
* @return string * @return string
*
* @api
*/ */
public function getScope() public function getScope()
{ {
@ -449,6 +518,8 @@ class Definition
* *
* @param Boolean $boolean * @param Boolean $boolean
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setPublic($boolean) public function setPublic($boolean)
{ {
@ -461,6 +532,8 @@ class Definition
* Whether this service is public facing * Whether this service is public facing
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function isPublic() public function isPublic()
{ {
@ -474,6 +547,8 @@ class Definition
* @param Boolean $boolean * @param Boolean $boolean
* *
* @return Definition the current instance * @return Definition the current instance
*
* @api
*/ */
public function setSynthetic($boolean) public function setSynthetic($boolean)
{ {
@ -487,6 +562,8 @@ class Definition
* container, but dynamically injected. * container, but dynamically injected.
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function isSynthetic() public function isSynthetic()
{ {
@ -500,6 +577,8 @@ class Definition
* @param Boolean $boolean * @param Boolean $boolean
* *
* @return Definition the current instance * @return Definition the current instance
*
* @api
*/ */
public function setAbstract($boolean) public function setAbstract($boolean)
{ {
@ -513,6 +592,8 @@ class Definition
* template for other definitions. * template for other definitions.
* *
* @return Boolean * @return Boolean
*
* @api
*/ */
public function isAbstract() public function isAbstract()
{ {
@ -525,6 +606,8 @@ class Definition
* @param mixed $callable A PHP callable * @param mixed $callable A PHP callable
* *
* @return Definition The current instance * @return Definition The current instance
*
* @api
*/ */
public function setConfigurator($callable) public function setConfigurator($callable)
{ {
@ -537,6 +620,8 @@ class Definition
* Gets the configurator to call after the service is fully initialized. * Gets the configurator to call after the service is fully initialized.
* *
* @return mixed The PHP callable to call * @return mixed The PHP callable to call
*
* @api
*/ */
public function getConfigurator() public function getConfigurator()
{ {

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* This definition decorates another definition. * This definition decorates another definition.
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class DefinitionDecorator extends Definition class DefinitionDecorator extends Definition
{ {
@ -25,6 +27,8 @@ class DefinitionDecorator extends Definition
* Constructor. * Constructor.
* *
* @param Definition $parent The Definition instance to decorate. * @param Definition $parent The Definition instance to decorate.
*
* @api
*/ */
public function __construct($parent) public function __construct($parent)
{ {
@ -38,6 +42,8 @@ class DefinitionDecorator extends Definition
* Returns the Definition being decorated. * Returns the Definition being decorated.
* *
* @return Definition * @return Definition
*
* @api
*/ */
public function getParent() public function getParent()
{ {
@ -48,6 +54,8 @@ class DefinitionDecorator extends Definition
* Returns all changes tracked for the Definition object. * Returns all changes tracked for the Definition object.
* *
* @return array An array of changes for this Definition * @return array An array of changes for this Definition
*
* @api
*/ */
public function getChanges() public function getChanges()
{ {
@ -56,6 +64,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setClass($class) public function setClass($class)
{ {
@ -66,6 +76,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setFactoryClass($class) public function setFactoryClass($class)
{ {
@ -76,6 +88,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setFactoryMethod($method) public function setFactoryMethod($method)
{ {
@ -86,6 +100,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setFactoryService($service) public function setFactoryService($service)
{ {
@ -96,6 +112,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setConfigurator($callable) public function setConfigurator($callable)
{ {
@ -106,6 +124,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setFile($file) public function setFile($file)
{ {
@ -116,6 +136,8 @@ class DefinitionDecorator extends Definition
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function setPublic($boolean) public function setPublic($boolean)
{ {
@ -137,6 +159,8 @@ class DefinitionDecorator extends Definition
* *
* @return DefinitionDecorator the current instance * @return DefinitionDecorator the current instance
* @throws \InvalidArgumentException when $index isn't an integer * @throws \InvalidArgumentException when $index isn't an integer
*
* @api
*/ */
public function replaceArgument($index, $value) public function replaceArgument($index, $value)
{ {

View File

@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
* Dumper is the abstract class for all built-in dumpers. * Dumper is the abstract class for all built-in dumpers.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
abstract class Dumper implements DumperInterface abstract class Dumper implements DumperInterface
{ {
@ -26,6 +28,8 @@ abstract class Dumper implements DumperInterface
* Constructor. * Constructor.
* *
* @param ContainerBuilder $container The service container to dump * @param ContainerBuilder $container The service container to dump
*
* @api
*/ */
public function __construct(ContainerBuilder $container) public function __construct(ContainerBuilder $container)
{ {

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection\Dumper;
* DumperInterface is the interface implemented by service container dumper classes. * DumperInterface is the interface implemented by service container dumper classes.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
interface DumperInterface interface DumperInterface
{ {
@ -24,6 +26,8 @@ interface DumperInterface
* @param array $options An array of options * @param array $options An array of options
* *
* @return string The representation of the service container * @return string The representation of the service container
*
* @api
*/ */
function dump(array $options = array()); function dump(array $options = array());
} }

View File

@ -25,6 +25,8 @@ use Symfony\Component\DependencyInjection\Parameter;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class PhpDumper extends Dumper class PhpDumper extends Dumper
{ {
@ -48,6 +50,8 @@ class PhpDumper extends Dumper
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function __construct(ContainerBuilder $container) public function __construct(ContainerBuilder $container)
{ {
@ -67,6 +71,8 @@ class PhpDumper extends Dumper
* @param array $options An array of options * @param array $options An array of options
* *
* @return string A PHP class representing of the service container * @return string A PHP class representing of the service container
*
* @api
*/ */
public function dump(array $options = array()) public function dump(array $options = array())
{ {

View File

@ -21,6 +21,8 @@ use Symfony\Component\DependencyInjection\Definition;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Martin Hasoň <martin.hason@gmail.com> * @author Martin Hasoň <martin.hason@gmail.com>
*
* @api
*/ */
class XmlDumper extends Dumper class XmlDumper extends Dumper
{ {
@ -35,6 +37,8 @@ class XmlDumper extends Dumper
* @param array $options An array of options * @param array $options An array of options
* *
* @return string An xml string representing of the service container * @return string An xml string representing of the service container
*
* @api
*/ */
public function dump(array $options = array()) public function dump(array $options = array())
{ {

View File

@ -20,6 +20,8 @@ use Symfony\Component\DependencyInjection\Reference;
* YamlDumper dumps a service container as a YAML string. * YamlDumper dumps a service container as a YAML string.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class YamlDumper extends Dumper class YamlDumper extends Dumper
{ {
@ -29,6 +31,8 @@ class YamlDumper extends Dumper
* @param array $options An array of options * @param array $options An array of options
* *
* @return string A YAML string representing of the service container * @return string A YAML string representing of the service container
*
* @api
*/ */
public function dump(array $options = array()) public function dump(array $options = array())
{ {

View File

@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
* ExtensionInterface is the interface implemented by container extension classes. * ExtensionInterface is the interface implemented by container extension classes.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
interface ExtensionInterface interface ExtensionInterface
{ {
@ -27,6 +29,8 @@ interface ExtensionInterface
* @param ContainerBuilder $container A ContainerBuilder instance * @param ContainerBuilder $container A ContainerBuilder instance
* *
* @throws \InvalidArgumentException When provided tag is not defined in this extension * @throws \InvalidArgumentException When provided tag is not defined in this extension
*
* @api
*/ */
function load(array $config, ContainerBuilder $container); function load(array $config, ContainerBuilder $container);
@ -34,6 +38,8 @@ interface ExtensionInterface
* Returns the namespace to be used for this extension (XML namespace). * Returns the namespace to be used for this extension (XML namespace).
* *
* @return string The XML namespace * @return string The XML namespace
*
* @api
*/ */
function getNamespace(); function getNamespace();
@ -41,6 +47,8 @@ interface ExtensionInterface
* Returns the base path for the XSD files. * Returns the base path for the XSD files.
* *
* @return string The XSD base path * @return string The XSD base path
*
* @api
*/ */
function getXsdValidationBasePath(); function getXsdValidationBasePath();
@ -50,6 +58,8 @@ interface ExtensionInterface
* This alias is also the mandatory prefix to use when using YAML. * This alias is also the mandatory prefix to use when using YAML.
* *
* @return string The alias * @return string The alias
*
* @api
*/ */
function getAlias(); function getAlias();
} }

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* Parameter represents a parameter reference. * Parameter represents a parameter reference.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class Parameter class Parameter
{ {

View File

@ -14,6 +14,8 @@ namespace Symfony\Component\DependencyInjection\ParameterBag;
/** /**
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class FrozenParameterBag extends ParameterBag class FrozenParameterBag extends ParameterBag
{ {
@ -26,6 +28,8 @@ class FrozenParameterBag extends ParameterBag
* This is always the case when used internally. * This is always the case when used internally.
* *
* @param array $parameters An array of parameters * @param array $parameters An array of parameters
*
* @api
*/ */
public function __construct(array $parameters = array()) public function __construct(array $parameters = array())
{ {
@ -35,6 +39,8 @@ class FrozenParameterBag extends ParameterBag
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function clear() public function clear()
{ {
@ -43,6 +49,8 @@ class FrozenParameterBag extends ParameterBag
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function add(array $parameters) public function add(array $parameters)
{ {
@ -51,6 +59,8 @@ class FrozenParameterBag extends ParameterBag
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @api
*/ */
public function set($name, $value) public function set($name, $value)
{ {

View File

@ -18,6 +18,8 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
/** /**
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class ParameterBag implements ParameterBagInterface class ParameterBag implements ParameterBagInterface
{ {
@ -28,6 +30,8 @@ class ParameterBag implements ParameterBagInterface
* Constructor. * Constructor.
* *
* @param array $parameters An array of parameters * @param array $parameters An array of parameters
*
* @api
*/ */
public function __construct(array $parameters = array()) public function __construct(array $parameters = array())
{ {
@ -38,6 +42,8 @@ class ParameterBag implements ParameterBagInterface
/** /**
* Clears all parameters. * Clears all parameters.
*
* @api
*/ */
public function clear() public function clear()
{ {
@ -48,6 +54,8 @@ class ParameterBag implements ParameterBagInterface
* Adds parameters to the service container parameters. * Adds parameters to the service container parameters.
* *
* @param array $parameters An array of parameters * @param array $parameters An array of parameters
*
* @api
*/ */
public function add(array $parameters) public function add(array $parameters)
{ {
@ -60,6 +68,8 @@ class ParameterBag implements ParameterBagInterface
* Gets the service container parameters. * Gets the service container parameters.
* *
* @return array An array of parameters * @return array An array of parameters
*
* @api
*/ */
public function all() public function all()
{ {
@ -74,6 +84,8 @@ class ParameterBag implements ParameterBagInterface
* @return mixed The parameter value * @return mixed The parameter value
* *
* @throws ParameterNotFoundException if the parameter is not defined * @throws ParameterNotFoundException if the parameter is not defined
*
* @api
*/ */
public function get($name) public function get($name)
{ {
@ -91,6 +103,8 @@ class ParameterBag implements ParameterBagInterface
* *
* @param string $name The parameter name * @param string $name The parameter name
* @param mixed $value The parameter value * @param mixed $value The parameter value
*
* @api
*/ */
public function set($name, $value) public function set($name, $value)
{ {
@ -103,6 +117,8 @@ class ParameterBag implements ParameterBagInterface
* @param string $name The parameter name * @param string $name The parameter name
* *
* @return Boolean true if the parameter name is defined, false otherwise * @return Boolean true if the parameter name is defined, false otherwise
*
* @api
*/ */
public function has($name) public function has($name)
{ {

View File

@ -17,11 +17,15 @@ use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
* ParameterBagInterface. * ParameterBagInterface.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
interface ParameterBagInterface interface ParameterBagInterface
{ {
/** /**
* Clears all parameters. * Clears all parameters.
*
* @api
*/ */
function clear(); function clear();
@ -29,6 +33,8 @@ interface ParameterBagInterface
* Adds parameters to the service container parameters. * Adds parameters to the service container parameters.
* *
* @param array $parameters An array of parameters * @param array $parameters An array of parameters
*
* @api
*/ */
function add(array $parameters); function add(array $parameters);
@ -36,6 +42,8 @@ interface ParameterBagInterface
* Gets the service container parameters. * Gets the service container parameters.
* *
* @return array An array of parameters * @return array An array of parameters
*
* @api
*/ */
function all(); function all();
@ -47,6 +55,8 @@ interface ParameterBagInterface
* @return mixed The parameter value * @return mixed The parameter value
* *
* @throws ParameterNotFoundException if the parameter is not defined * @throws ParameterNotFoundException if the parameter is not defined
*
* @api
*/ */
function get($name); function get($name);
@ -55,6 +65,8 @@ interface ParameterBagInterface
* *
* @param string $name The parameter name * @param string $name The parameter name
* @param mixed $value The parameter value * @param mixed $value The parameter value
*
* @api
*/ */
function set($name, $value); function set($name, $value);
@ -64,6 +76,8 @@ interface ParameterBagInterface
* @param string $name The parameter name * @param string $name The parameter name
* *
* @return Boolean true if the parameter name is defined, false otherwise * @return Boolean true if the parameter name is defined, false otherwise
*
* @api
*/ */
function has($name); function has($name);

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* Reference represents a service reference. * Reference represents a service reference.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
class Reference class Reference
{ {

View File

@ -15,23 +15,34 @@ namespace Symfony\Component\DependencyInjection;
* Scope class. * Scope class.
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
class Scope implements ScopeInterface class Scope implements ScopeInterface
{ {
private $name; private $name;
private $parentName; private $parentName;
/**
* @api
*/
public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER) public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER)
{ {
$this->name = $name; $this->name = $name;
$this->parentName = $parentName; $this->parentName = $parentName;
} }
/**
* @api
*/
public function getName() public function getName()
{ {
return $this->name; return $this->name;
} }
/**
* @api
*/
public function getParentName() public function getParentName()
{ {
return $this->parentName; return $this->parentName;

View File

@ -15,9 +15,18 @@ namespace Symfony\Component\DependencyInjection;
* Scope Interface. * Scope Interface.
* *
* @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @api
*/ */
interface ScopeInterface interface ScopeInterface
{ {
/**
* @api
*/
function getName(); function getName();
/**
* @api
*/
function getParentName(); function getParentName();
} }

View File

@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection;
* TaggedContainerInterface is the interface implemented when a container knows how to deals with tags. * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/ */
interface TaggedContainerInterface extends ContainerInterface interface TaggedContainerInterface extends ContainerInterface
{ {
@ -24,6 +26,8 @@ interface TaggedContainerInterface extends ContainerInterface
* @param string $name The tag name * @param string $name The tag name
* *
* @return array An array of tags * @return array An array of tags
*
* @api
*/ */
function findTaggedServiceIds($name); function findTaggedServiceIds($name);
} }