diff --git a/src/Symfony/Component/DependencyInjection/Alias.php b/src/Symfony/Component/DependencyInjection/Alias.php index 4658c80718..9a377eda6a 100644 --- a/src/Symfony/Component/DependencyInjection/Alias.php +++ b/src/Symfony/Component/DependencyInjection/Alias.php @@ -11,6 +11,9 @@ namespace Symfony\Component\DependencyInjection; +/** + * @api + */ class Alias { private $id; @@ -21,6 +24,8 @@ class Alias * * @param string $id Alias identifier * @param Boolean $public If this alias is public + * + * @api */ public function __construct($id, $public = true) { @@ -32,6 +37,8 @@ class Alias * Checks if this DI Alias should be public or not. * * @return Boolean + * + * @api */ public function isPublic() { @@ -42,6 +49,8 @@ class Alias * Sets if this Alias is public. * * @param Boolean $boolean If this Alias should be public + * + * @api */ public function setPublic($boolean) { @@ -52,6 +61,8 @@ class Alias * Returns the Id of this alias. * * @return string The alias id + * + * @api */ public function __toString() { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index 0395481beb..01f224b823 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -18,6 +18,8 @@ use Symfony\Component\DependencyInjection\Compiler\PassConfig; * This class is used to remove circular dependencies between individual passes. * * @author Johannes M. Schmitt + * + * @api */ class Compiler { @@ -41,6 +43,8 @@ class Compiler * Returns the PassConfig. * * @return PassConfig The PassConfig instance + * + * @api */ public function getPassConfig() { @@ -51,6 +55,8 @@ class Compiler * Returns the ServiceReferenceGraph. * * @return ServiceReferenceGraph The ServiceReferenceGraph instance + * + * @api */ public function getServiceReferenceGraph() { @@ -72,6 +78,8 @@ class Compiler * * @param CompilerPassInterface $pass A compiler pass * @param string $type The type of the pass + * + * @api */ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) { @@ -102,6 +110,8 @@ class Compiler * Run the Compiler and process all Passes. * * @param ContainerBuilder $container + * + * @api */ public function compile(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php index 827a9c71db..414dabaf33 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php @@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; * Interface that must be implemented by compilation passes * * @author Johannes M. Schmitt + * + * @api */ interface CompilerPassInterface { @@ -25,6 +27,8 @@ interface CompilerPassInterface * * @param ContainerBuilder $container * @return void + * + * @api */ function process(ContainerBuilder $container); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php index faf7f804da..b48df0aad7 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php @@ -17,6 +17,8 @@ namespace Symfony\Component\DependencyInjection\Compiler; * This class has a default configuration embedded. * * @author Johannes M. Schmitt + * + * @api */ class PassConfig { @@ -73,6 +75,8 @@ class PassConfig * Returns all passes in order to be processed. * * @return array An array of all passes to process + * + * @api */ public function getPasses() { @@ -92,6 +96,8 @@ class PassConfig * @param CompilerPassInterface $pass A Compiler pass * @param string $type The pass type * @throws \InvalidArgumentException when a pass type doesn't exist + * + * @api */ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION) { @@ -108,6 +114,8 @@ class PassConfig * Gets all passes for the AfterRemoving pass. * * @return array An array of passes + * + * @api */ public function getAfterRemovingPasses() { @@ -118,6 +126,8 @@ class PassConfig * Gets all passes for the BeforeOptimization pass. * * @return array An array of passes + * + * @api */ public function getBeforeOptimizationPasses() { @@ -128,6 +138,8 @@ class PassConfig * Gets all passes for the BeforeRemoving pass. * * @return array An array of passes + * + * @api */ public function getBeforeRemovingPasses() { @@ -138,6 +150,8 @@ class PassConfig * Gets all passes for the Optimization pass. * * @return array An array of passes + * + * @api */ public function getOptimizationPasses() { @@ -148,6 +162,8 @@ class PassConfig * Gets all passes for the Removing pass. * * @return array An array of passes + * + * @api */ public function getRemovingPasses() { @@ -158,6 +174,8 @@ class PassConfig * Gets all passes for the Merge pass. * * @return array An array of passes + * + * @api */ public function getMergePass() { @@ -168,6 +186,8 @@ class PassConfig * Sets the Merge Pass. * * @param CompilerPassInterface $pass The merge pass + * + * @api */ public function setMergePass(CompilerPassInterface $pass) { @@ -178,6 +198,8 @@ class PassConfig * Sets the AfterRemoving passes. * * @param array $passes An array of passes + * + * @api */ public function setAfterRemovingPasses(array $passes) { @@ -188,6 +210,8 @@ class PassConfig * Sets the BeforeOptimization passes. * * @param array $passes An array of passes + * + * @api */ public function setBeforeOptimizationPasses(array $passes) { @@ -198,6 +222,8 @@ class PassConfig * Sets the BeforeRemoving passes. * * @param array $passes An array of passes + * + * @api */ public function setBeforeRemovingPasses(array $passes) { @@ -208,6 +234,8 @@ class PassConfig * Sets the Optimization passes. * * @param array $passes An array of passes + * + * @api */ public function setOptimizationPasses(array $passes) { @@ -218,6 +246,8 @@ class PassConfig * Sets the Removing passes. * * @param array $passes An array of passes + * + * @api */ public function setRemovingPasses(array $passes) { diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index bdb47a859a..54d278e479 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -54,6 +54,8 @@ use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; * * @author Fabien Potencier * @author Johannes M. Schmitt + * + * @api */ class Container implements ContainerInterface { @@ -69,6 +71,8 @@ class Container implements ContainerInterface * Constructor. * * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance + * + * @api */ public function __construct(ParameterBagInterface $parameterBag = null) { @@ -90,6 +94,8 @@ class Container implements ContainerInterface * * * Parameter values are resolved; * * The parameter bag is frozen. + * + * @api */ public function compile() { @@ -102,6 +108,8 @@ class Container implements ContainerInterface * Returns true if the container parameter bag are frozen. * * @return Boolean true if the container parameter bag are frozen, false otherwise + * + * @api */ public function isFrozen() { @@ -112,6 +120,8 @@ class Container implements ContainerInterface * Gets the service container parameter bag. * * @return ParameterBagInterface A ParameterBagInterface instance + * + * @api */ public function getParameterBag() { @@ -126,6 +136,8 @@ class Container implements ContainerInterface * @return mixed The parameter value * * @throws \InvalidArgumentException if the parameter is not defined + * + * @api */ public function getParameter($name) { @@ -138,6 +150,8 @@ class Container implements ContainerInterface * @param string $name The parameter name * * @return Boolean The presence of parameter in container + * + * @api */ public function hasParameter($name) { @@ -149,6 +163,8 @@ class Container implements ContainerInterface * * @param string $name The parameter name * @param mixed $value The parameter value + * + * @api */ public function setParameter($name, $value) { @@ -161,6 +177,8 @@ class Container implements ContainerInterface * @param string $id The service identifier * @param object $service The service instance * @param string $scope The scope of the service + * + * @api */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { @@ -187,6 +205,8 @@ class Container implements ContainerInterface * @param string $id The service identifier * * @return Boolean true if the service is defined, false otherwise + * + * @api */ public function has($id) { @@ -209,6 +229,8 @@ class Container implements ContainerInterface * @throws \InvalidArgumentException if the service is not defined * * @see Reference + * + * @api */ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) { @@ -265,6 +287,8 @@ class Container implements ContainerInterface * * @param string $name * @return void + * + * @api */ public function enterScope($name) { @@ -309,6 +333,8 @@ class Container implements ContainerInterface * @param string $name The name of the scope to leave * @return void * @throws \InvalidArgumentException if the scope is not active + * + * @api */ public function leaveScope($name) { @@ -345,6 +371,8 @@ class Container implements ContainerInterface * * @param ScopeInterface $scope * @return void + * + * @api */ public function addScope(ScopeInterface $scope) { @@ -376,6 +404,8 @@ class Container implements ContainerInterface * * @param string $name The name of the scope * @return Boolean + * + * @api */ public function hasScope($name) { @@ -389,6 +419,8 @@ class Container implements ContainerInterface * * @param string $name * @return Boolean + * + * @api */ public function isScopeActive($name) { diff --git a/src/Symfony/Component/DependencyInjection/ContainerAware.php b/src/Symfony/Component/DependencyInjection/ContainerAware.php index 35efa4d935..1ae1db44af 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAware.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAware.php @@ -15,11 +15,15 @@ namespace Symfony\Component\DependencyInjection; * A simple implementation of ContainerAwareInterface. * * @author Fabien Potencier + * + * @api */ class ContainerAware implements ContainerAwareInterface { /** * @var ContainerInterface + * + * @api */ protected $container; @@ -27,6 +31,8 @@ class ContainerAware implements ContainerAwareInterface * Sets the Container associated with this Controller. * * @param ContainerInterface $container A ContainerInterface instance + * + * @api */ public function setContainer(ContainerInterface $container = null) { diff --git a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php index dfab742ae4..1879ec0617 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * ContainerAwareInterface should be implemented by classes that depends on a Container. * * @author Fabien Potencier + * + * @api */ interface ContainerAwareInterface { @@ -22,6 +24,8 @@ interface ContainerAwareInterface * Sets the Container. * * @param ContainerInterface $container A ContainerInterface instance + * + * @api */ function setContainer(ContainerInterface $container = null); } diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index acde4bcfd8..520f901c72 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -23,6 +23,8 @@ use Symfony\Component\Config\Resource\ResourceInterface; * ContainerBuilder is a DI container that provides an API to easily describe services. * * @author Fabien Potencier + * + * @api */ class ContainerBuilder extends Container implements TaggedContainerInterface { @@ -39,6 +41,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Registers an extension. * * @param ExtensionInterface $extension An extension instance + * + * @api */ public function registerExtension(ExtensionInterface $extension) { @@ -55,6 +59,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $name An alias or a namespace * * @return ExtensionInterface An extension instance + * + * @api */ public function getExtension($name) { @@ -73,6 +79,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Returns all registered extensions. * * @return array An array of ExtensionInterface + * + * @api */ public function getExtensions() { @@ -84,6 +92,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param string $name The name of the extension * @return Boolean If the extension exists + * + * @api */ public function hasExtension($name) { @@ -94,6 +104,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Returns an array of resources loaded to build this configuration. * * @return ResourceInterface[] An array of resources + * + * @api */ public function getResources() { @@ -106,6 +118,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param ResourceInterface $resource A resource instance * * @return ContainerBuilder The current instance + * + * @api */ public function addResource(ResourceInterface $resource) { @@ -118,6 +132,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Adds the object class hierarchy as resources. * * @param object $object An object instance + * + * @api */ 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 * * @return ContainerBuilder The current instance + * + * @api */ public function loadFromExtension($extension, array $values = array()) { @@ -153,6 +171,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param CompilerPassInterface $pass A compiler pass * @param string $type The type of compiler pass + * + * @api */ 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. * * @return PassConfig The compiler pass config + * + * @api */ public function getCompilerPassConfig() { @@ -183,6 +205,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Returns the compiler. * * @return Compiler The compiler + * + * @api */ public function getCompiler() { @@ -197,6 +221,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Returns all Scopes. * * @return array An array of scopes + * + * @api */ public function getScopes() { @@ -207,6 +233,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Returns all Scope children. * * @return array An array of scope children. + * + * @api */ public function getScopeChildren() { @@ -221,6 +249,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $scope The scope * * @throws BadMethodCallException + * + * @api */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { @@ -239,6 +269,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Removes a service definition. * * @param string $id The service identifier + * + * @api */ public function removeDefinition($id) { @@ -251,6 +283,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $id The service identifier * * @return Boolean true if the service is defined, false otherwise + * + * @api */ 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 * * @see Reference + * + * @api */ 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. * @throws \LogicException when this ContainerBuilder is frozen + * + * @api */ public function merge(ContainerBuilder $container) { @@ -357,6 +395,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $name The name of the extension * * @return array An array of configuration + * + * @api */ public function getExtensionConfig($name) { @@ -380,6 +420,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * Parameter values are resolved; * * The parameter bag is frozen; * * Extension loading is disabled. + * + * @api */ public function compile() { @@ -412,6 +454,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Adds the service aliases. * * @param array $aliases An array of aliases + * + * @api */ public function addAliases(array $aliases) { @@ -424,6 +468,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Sets the service aliases. * * @param array $aliases An array of service definitions + * + * @api */ public function setAliases(array $aliases) { @@ -436,6 +482,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param string $alias The alias to create * @param mixed $id The service to alias + * + * @api */ public function setAlias($alias, $id) { @@ -460,6 +508,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Removes an alias. * * @param string $alias The alias to remove + * + * @api */ public function removeAlias($alias) { @@ -472,6 +522,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $id The service identifier * * @return Boolean true if the alias exists, false otherwise + * + * @api */ public function hasAlias($id) { @@ -482,6 +534,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Gets all defined aliases. * * @return array An array of aliases + * + * @api */ public function getAliases() { @@ -496,6 +550,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @return string The aliased service identifier * * @throws \InvalidArgumentException if the alias does not exist + * + * @api */ public function getAlias($id) { @@ -518,6 +574,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $class The service class * * @return Definition A Definition instance + * + * @api */ public function register($id, $class = null) { @@ -528,6 +586,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Adds the service definitions. * * @param Definition[] $definitions An array of service definitions + * + * @api */ public function addDefinitions(array $definitions) { @@ -540,6 +600,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Sets the service definitions. * * @param array $definitions An array of service definitions + * + * @api */ public function setDefinitions(array $definitions) { @@ -551,6 +613,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * Gets all service definitions. * * @return array An array of Definition instances + * + * @api */ public function getDefinitions() { @@ -564,6 +628,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param Definition $definition A Definition instance * * @throws BadMethodCallException + * + * @api */ public function setDefinition($id, Definition $definition) { @@ -584,6 +650,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $id The service identifier * * @return Boolean true if the service definition exists, false otherwise + * + * @api */ public function hasDefinition($id) { @@ -598,6 +666,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @return Definition A Definition instance * * @throws \InvalidArgumentException if the service definition does not exist + * + * @api */ public function getDefinition($id) { @@ -620,6 +690,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @return Definition A Definition instance * * @throws \InvalidArgumentException if the service definition does not exist + * + * @api */ public function findDefinition($id) { @@ -742,6 +814,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $name The tag name * * @return array An array of tags + * + * @api */ public function findTaggedServiceIds($name) { diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php index e7255703b4..5d41075dfd 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -16,6 +16,8 @@ namespace Symfony\Component\DependencyInjection; * * @author Fabien Potencier * @author Johannes M. Schmitt + * + * @api */ interface ContainerInterface { @@ -31,6 +33,8 @@ interface ContainerInterface * @param string $id The service identifier * @param object $service The service instance * @param string $scope The scope of the service + * + * @api */ function set($id, $service, $scope = self::SCOPE_CONTAINER); @@ -45,6 +49,8 @@ interface ContainerInterface * @throws \InvalidArgumentException if the service is not defined * * @see Reference + * + * @api */ function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); @@ -54,6 +60,8 @@ interface ContainerInterface * @param string $id The service identifier * * @return Boolean true if the service is defined, false otherwise + * + * @api */ function has($id); @@ -65,6 +73,8 @@ interface ContainerInterface * @return mixed The parameter value * * @throws \InvalidArgumentException if the parameter is not defined + * + * @api */ function getParameter($name); @@ -74,6 +84,8 @@ interface ContainerInterface * @param string $name The parameter name * * @return Boolean The presence of parameter in container + * + * @api */ function hasParameter($name); @@ -82,6 +94,8 @@ interface ContainerInterface * * @param string $name The parameter name * @param mixed $value The parameter value + * + * @api */ function setParameter($name, $value); @@ -90,6 +104,8 @@ interface ContainerInterface * * @param string $name * @return void + * + * @api */ function enterScope($name); @@ -98,6 +114,8 @@ interface ContainerInterface * * @param string $name * @return void + * + * @api */ function leaveScope($name); @@ -106,6 +124,8 @@ interface ContainerInterface * * @param ScopeInterface $scope * @return void + * + * @api */ function addScope(ScopeInterface $scope); @@ -114,6 +134,8 @@ interface ContainerInterface * * @param string $name * @return Boolean + * + * @api */ function hasScope($name); @@ -124,6 +146,8 @@ interface ContainerInterface * * @param string $name * @return Boolean + * + * @api */ function isScopeActive($name); } diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index f7d16f2cc6..8df5f3c40a 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * Definition represents a service definition. * * @author Fabien Potencier + * + * @api */ class Definition { @@ -39,6 +41,8 @@ class Definition * * @param string $class The service class * @param array $arguments An array of arguments to pass to the service constructor + * + * @api */ public function __construct($class = null, array $arguments = array()) { @@ -60,6 +64,8 @@ class Definition * @param string $factoryClass The factory class name * * @return Definition The current instance + * + * @api */ public function setFactoryClass($factoryClass) { @@ -72,6 +78,8 @@ class Definition * Gets the factory class. * * @return string The factory class name + * + * @api */ public function getFactoryClass() { @@ -84,6 +92,8 @@ class Definition * @param string $factoryMethod The factory method name * * @return Definition The current instance + * + * @api */ public function setFactoryMethod($factoryMethod) { @@ -96,6 +106,8 @@ class Definition * Gets the factory method. * * @return string The factory method name + * + * @api */ public function getFactoryMethod() { @@ -108,6 +120,8 @@ class Definition * @param string $factoryService The factory service id * * @return Definition The current instance + * + * @api */ public function setFactoryService($factoryService) { @@ -120,6 +134,8 @@ class Definition * Gets the factory service id. * * @return string The factory service id + * + * @api */ public function getFactoryService() { @@ -132,6 +148,8 @@ class Definition * @param string $class The service class * * @return Definition The current instance + * + * @api */ public function setClass($class) { @@ -144,6 +162,8 @@ class Definition * Sets the service class. * * @return string The service class + * + * @api */ public function getClass() { @@ -156,6 +176,8 @@ class Definition * @param array $arguments An array of arguments * * @return Definition The current instance + * + * @api */ public function setArguments(array $arguments) { @@ -164,6 +186,9 @@ class Definition return $this; } + /** + * @api + */ public function setProperties(array $properties) { $this->properties = $properties; @@ -171,11 +196,17 @@ class Definition return $this; } + /** + * @api + */ public function getProperties() { return $this->properties; } + /** + * @api + */ public function setProperty($name, $value) { $this->properties[$name] = $value; @@ -189,6 +220,8 @@ class Definition * @param mixed $argument An argument * * @return Definition The current instance + * + * @api */ public function addArgument($argument) { @@ -204,6 +237,8 @@ class Definition * @param mixed $argument * * @return Definition The current instance + * + * @api */ public function replaceArgument($index, $argument) { @@ -220,6 +255,8 @@ class Definition * Gets the arguments to pass to the service constructor/factory method. * * @return array The array of arguments + * + * @api */ public function getArguments() { @@ -232,6 +269,8 @@ class Definition * @param integer $index * * @return mixed The argument value + * + * @api */ public function getArgument($index) { @@ -248,6 +287,8 @@ class Definition * @param array $calls An array of method calls * * @return Definition The current instance + * + * @api */ 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 * * @return Definition The current instance + * + * @api */ public function addMethodCall($method, array $arguments = array()) { @@ -280,6 +323,8 @@ class Definition * @param string $method The method name to remove * * @return Definition The current instance + * + * @api */ public function removeMethodCall($method) { @@ -299,6 +344,8 @@ class Definition * @param string $method The method name to search for * * @return Boolean + * + * @api */ public function hasMethodCall($method) { @@ -315,6 +362,8 @@ class Definition * Gets the methods to call after service initialization. * * @return array An array of method calls + * + * @api */ public function getMethodCalls() { @@ -327,6 +376,8 @@ class Definition * @param array $tags * * @return Definition the current instance + * + * @api */ public function setTags(array $tags) { @@ -339,6 +390,8 @@ class Definition * Returns all tags. * * @return array An array of tags + * + * @api */ public function getTags() { @@ -351,6 +404,8 @@ class Definition * @param string $name The tag name * * @return array An array of attributes + * + * @api */ public function getTag($name) { @@ -364,6 +419,8 @@ class Definition * @param array $attributes An array of attributes * * @return Definition The current instance + * + * @api */ public function addTag($name, array $attributes = array()) { @@ -378,6 +435,8 @@ class Definition * @param string $name * * @return Boolean + * + * @api */ public function hasTag($name) { @@ -388,6 +447,8 @@ class Definition * Clears the tags for this definition. * * @return Definition The current instance + * + * @api */ public function clearTags() { @@ -402,6 +463,8 @@ class Definition * @param string $file A full pathname to include * * @return Definition The current instance + * + * @api */ public function setFile($file) { @@ -414,6 +477,8 @@ class Definition * Gets the file to require before creating the service. * * @return string The full pathname to include + * + * @api */ public function getFile() { @@ -426,6 +491,8 @@ class Definition * @param string $scope Whether the service must be shared or not * * @return Definition The current instance + * + * @api */ public function setScope($scope) { @@ -438,6 +505,8 @@ class Definition * Returns the scope of the service * * @return string + * + * @api */ public function getScope() { @@ -449,6 +518,8 @@ class Definition * * @param Boolean $boolean * @return Definition The current instance + * + * @api */ public function setPublic($boolean) { @@ -461,6 +532,8 @@ class Definition * Whether this service is public facing * * @return Boolean + * + * @api */ public function isPublic() { @@ -474,6 +547,8 @@ class Definition * @param Boolean $boolean * * @return Definition the current instance + * + * @api */ public function setSynthetic($boolean) { @@ -487,6 +562,8 @@ class Definition * container, but dynamically injected. * * @return Boolean + * + * @api */ public function isSynthetic() { @@ -500,6 +577,8 @@ class Definition * @param Boolean $boolean * * @return Definition the current instance + * + * @api */ public function setAbstract($boolean) { @@ -513,6 +592,8 @@ class Definition * template for other definitions. * * @return Boolean + * + * @api */ public function isAbstract() { @@ -525,6 +606,8 @@ class Definition * @param mixed $callable A PHP callable * * @return Definition The current instance + * + * @api */ public function setConfigurator($callable) { @@ -537,6 +620,8 @@ class Definition * Gets the configurator to call after the service is fully initialized. * * @return mixed The PHP callable to call + * + * @api */ public function getConfigurator() { diff --git a/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php b/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php index 94f6f08e01..dca6a9ce0c 100644 --- a/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php +++ b/src/Symfony/Component/DependencyInjection/DefinitionDecorator.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * This definition decorates another definition. * * @author Johannes M. Schmitt + * + * @api */ class DefinitionDecorator extends Definition { @@ -25,6 +27,8 @@ class DefinitionDecorator extends Definition * Constructor. * * @param Definition $parent The Definition instance to decorate. + * + * @api */ public function __construct($parent) { @@ -38,6 +42,8 @@ class DefinitionDecorator extends Definition * Returns the Definition being decorated. * * @return Definition + * + * @api */ public function getParent() { @@ -48,6 +54,8 @@ class DefinitionDecorator extends Definition * Returns all changes tracked for the Definition object. * * @return array An array of changes for this Definition + * + * @api */ public function getChanges() { @@ -56,6 +64,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setClass($class) { @@ -66,6 +76,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setFactoryClass($class) { @@ -76,6 +88,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setFactoryMethod($method) { @@ -86,6 +100,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setFactoryService($service) { @@ -96,6 +112,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setConfigurator($callable) { @@ -106,6 +124,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setFile($file) { @@ -116,6 +136,8 @@ class DefinitionDecorator extends Definition /** * {@inheritDoc} + * + * @api */ public function setPublic($boolean) { @@ -137,6 +159,8 @@ class DefinitionDecorator extends Definition * * @return DefinitionDecorator the current instance * @throws \InvalidArgumentException when $index isn't an integer + * + * @api */ public function replaceArgument($index, $value) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php b/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php index 4b9d586f2c..98924014ad 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/Dumper.php @@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; * Dumper is the abstract class for all built-in dumpers. * * @author Fabien Potencier + * + * @api */ abstract class Dumper implements DumperInterface { @@ -26,6 +28,8 @@ abstract class Dumper implements DumperInterface * Constructor. * * @param ContainerBuilder $container The service container to dump + * + * @api */ public function __construct(ContainerBuilder $container) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php index 7b90be50ef..c05dc6d49d 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection\Dumper; * DumperInterface is the interface implemented by service container dumper classes. * * @author Fabien Potencier + * + * @api */ interface DumperInterface { @@ -24,6 +26,8 @@ interface DumperInterface * @param array $options An array of options * * @return string The representation of the service container + * + * @api */ function dump(array $options = array()); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 934429b839..2c1f982598 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -25,6 +25,8 @@ use Symfony\Component\DependencyInjection\Parameter; * * @author Fabien Potencier * @author Johannes M. Schmitt + * + * @api */ class PhpDumper extends Dumper { @@ -48,6 +50,8 @@ class PhpDumper extends Dumper /** * {@inheritDoc} + * + * @api */ public function __construct(ContainerBuilder $container) { @@ -67,6 +71,8 @@ class PhpDumper extends Dumper * @param array $options An array of options * * @return string A PHP class representing of the service container + * + * @api */ public function dump(array $options = array()) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php index 7d9d9ba12b..4c9c2d90af 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -21,6 +21,8 @@ use Symfony\Component\DependencyInjection\Definition; * * @author Fabien Potencier * @author Martin HasoĊˆ + * + * @api */ class XmlDumper extends Dumper { @@ -35,6 +37,8 @@ class XmlDumper extends Dumper * @param array $options An array of options * * @return string An xml string representing of the service container + * + * @api */ public function dump(array $options = array()) { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 04be2846cb..2391f286c0 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -20,6 +20,8 @@ use Symfony\Component\DependencyInjection\Reference; * YamlDumper dumps a service container as a YAML string. * * @author Fabien Potencier + * + * @api */ class YamlDumper extends Dumper { @@ -29,6 +31,8 @@ class YamlDumper extends Dumper * @param array $options An array of options * * @return string A YAML string representing of the service container + * + * @api */ public function dump(array $options = array()) { diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php index 928556d486..7219281808 100644 --- a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -17,6 +17,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; * ExtensionInterface is the interface implemented by container extension classes. * * @author Fabien Potencier + * + * @api */ interface ExtensionInterface { @@ -27,6 +29,8 @@ interface ExtensionInterface * @param ContainerBuilder $container A ContainerBuilder instance * * @throws \InvalidArgumentException When provided tag is not defined in this extension + * + * @api */ function load(array $config, ContainerBuilder $container); @@ -34,6 +38,8 @@ interface ExtensionInterface * Returns the namespace to be used for this extension (XML namespace). * * @return string The XML namespace + * + * @api */ function getNamespace(); @@ -41,6 +47,8 @@ interface ExtensionInterface * Returns the base path for the XSD files. * * @return string The XSD base path + * + * @api */ function getXsdValidationBasePath(); @@ -50,6 +58,8 @@ interface ExtensionInterface * This alias is also the mandatory prefix to use when using YAML. * * @return string The alias + * + * @api */ function getAlias(); } diff --git a/src/Symfony/Component/DependencyInjection/Parameter.php b/src/Symfony/Component/DependencyInjection/Parameter.php index 5431ed8221..7ba8c3a630 100644 --- a/src/Symfony/Component/DependencyInjection/Parameter.php +++ b/src/Symfony/Component/DependencyInjection/Parameter.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * Parameter represents a parameter reference. * * @author Fabien Potencier + * + * @api */ class Parameter { diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php index 9f89f2135c..894f18d7a5 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php @@ -14,6 +14,8 @@ namespace Symfony\Component\DependencyInjection\ParameterBag; /** * * @author Fabien Potencier + * + * @api */ class FrozenParameterBag extends ParameterBag { @@ -26,6 +28,8 @@ class FrozenParameterBag extends ParameterBag * This is always the case when used internally. * * @param array $parameters An array of parameters + * + * @api */ public function __construct(array $parameters = array()) { @@ -35,6 +39,8 @@ class FrozenParameterBag extends ParameterBag /** * {@inheritDoc} + * + * @api */ public function clear() { @@ -43,6 +49,8 @@ class FrozenParameterBag extends ParameterBag /** * {@inheritDoc} + * + * @api */ public function add(array $parameters) { @@ -51,6 +59,8 @@ class FrozenParameterBag extends ParameterBag /** * {@inheritDoc} + * + * @api */ public function set($name, $value) { diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php index 8453cf2257..8cb1f133c6 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php @@ -18,6 +18,8 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** * * @author Fabien Potencier + * + * @api */ class ParameterBag implements ParameterBagInterface { @@ -28,6 +30,8 @@ class ParameterBag implements ParameterBagInterface * Constructor. * * @param array $parameters An array of parameters + * + * @api */ public function __construct(array $parameters = array()) { @@ -38,6 +42,8 @@ class ParameterBag implements ParameterBagInterface /** * Clears all parameters. + * + * @api */ public function clear() { @@ -48,6 +54,8 @@ class ParameterBag implements ParameterBagInterface * Adds parameters to the service container parameters. * * @param array $parameters An array of parameters + * + * @api */ public function add(array $parameters) { @@ -60,6 +68,8 @@ class ParameterBag implements ParameterBagInterface * Gets the service container parameters. * * @return array An array of parameters + * + * @api */ public function all() { @@ -74,6 +84,8 @@ class ParameterBag implements ParameterBagInterface * @return mixed The parameter value * * @throws ParameterNotFoundException if the parameter is not defined + * + * @api */ public function get($name) { @@ -91,6 +103,8 @@ class ParameterBag implements ParameterBagInterface * * @param string $name The parameter name * @param mixed $value The parameter value + * + * @api */ public function set($name, $value) { @@ -103,6 +117,8 @@ class ParameterBag implements ParameterBagInterface * @param string $name The parameter name * * @return Boolean true if the parameter name is defined, false otherwise + * + * @api */ public function has($name) { diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php index e5b36d9603..b530d5dc66 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php @@ -17,11 +17,15 @@ use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; * ParameterBagInterface. * * @author Fabien Potencier + * + * @api */ interface ParameterBagInterface { /** * Clears all parameters. + * + * @api */ function clear(); @@ -29,6 +33,8 @@ interface ParameterBagInterface * Adds parameters to the service container parameters. * * @param array $parameters An array of parameters + * + * @api */ function add(array $parameters); @@ -36,6 +42,8 @@ interface ParameterBagInterface * Gets the service container parameters. * * @return array An array of parameters + * + * @api */ function all(); @@ -47,6 +55,8 @@ interface ParameterBagInterface * @return mixed The parameter value * * @throws ParameterNotFoundException if the parameter is not defined + * + * @api */ function get($name); @@ -55,6 +65,8 @@ interface ParameterBagInterface * * @param string $name The parameter name * @param mixed $value The parameter value + * + * @api */ function set($name, $value); @@ -64,6 +76,8 @@ interface ParameterBagInterface * @param string $name The parameter name * * @return Boolean true if the parameter name is defined, false otherwise + * + * @api */ function has($name); diff --git a/src/Symfony/Component/DependencyInjection/Reference.php b/src/Symfony/Component/DependencyInjection/Reference.php index 8e21972e1e..89279f7157 100644 --- a/src/Symfony/Component/DependencyInjection/Reference.php +++ b/src/Symfony/Component/DependencyInjection/Reference.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * Reference represents a service reference. * * @author Fabien Potencier + * + * @api */ class Reference { diff --git a/src/Symfony/Component/DependencyInjection/Scope.php b/src/Symfony/Component/DependencyInjection/Scope.php index d917790016..6bc6acbcf7 100644 --- a/src/Symfony/Component/DependencyInjection/Scope.php +++ b/src/Symfony/Component/DependencyInjection/Scope.php @@ -15,23 +15,34 @@ namespace Symfony\Component\DependencyInjection; * Scope class. * * @author Johannes M. Schmitt + * + * @api */ class Scope implements ScopeInterface { private $name; private $parentName; + /** + * @api + */ public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER) { $this->name = $name; $this->parentName = $parentName; } + /** + * @api + */ public function getName() { return $this->name; } + /** + * @api + */ public function getParentName() { return $this->parentName; diff --git a/src/Symfony/Component/DependencyInjection/ScopeInterface.php b/src/Symfony/Component/DependencyInjection/ScopeInterface.php index 2568fb0ee2..42ac3e212c 100644 --- a/src/Symfony/Component/DependencyInjection/ScopeInterface.php +++ b/src/Symfony/Component/DependencyInjection/ScopeInterface.php @@ -15,9 +15,18 @@ namespace Symfony\Component\DependencyInjection; * Scope Interface. * * @author Johannes M. Schmitt + * + * @api */ interface ScopeInterface { + /** + * @api + */ function getName(); + + /** + * @api + */ function getParentName(); } diff --git a/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php b/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php index 0694d4dfcb..81adb2096d 100644 --- a/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/TaggedContainerInterface.php @@ -15,6 +15,8 @@ namespace Symfony\Component\DependencyInjection; * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags. * * @author Fabien Potencier + * + * @api */ interface TaggedContainerInterface extends ContainerInterface { @@ -24,6 +26,8 @@ interface TaggedContainerInterface extends ContainerInterface * @param string $name The tag name * * @return array An array of tags + * + * @api */ function findTaggedServiceIds($name); }