merged branch ruian/patch-2 (PR #6028)
This PR was merged into the master branch.
Commits
-------
83b37ff
[DependencyInjection] Return self for add...
Discussion
----------
[DependencyInjection] Return self for add...
Bug fix: no
Forget fix: yes
Feature addition: no
Symfony2 tests pass: yes
License of the code: MIT
Return self instance when call an ADD something method.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T13:24:45Z
Please fix PHPDoc accordingly
---------------------------------------------------------------------------
by ruian at 2012-11-16T13:38:41Z
@pborreli done.
This commit is contained in:
commit
4ad1e14056
@ -145,6 +145,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
*
|
*
|
||||||
* @param object $object An object instance
|
* @param object $object An object instance
|
||||||
*
|
*
|
||||||
|
* @return ContainerBuilder The current instance
|
||||||
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
public function addObjectResource($object)
|
public function addObjectResource($object)
|
||||||
@ -153,6 +155,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
do {
|
do {
|
||||||
$this->addResource(new FileResource($parent->getFileName()));
|
$this->addResource(new FileResource($parent->getFileName()));
|
||||||
} while ($parent = $parent->getParentClass());
|
} while ($parent = $parent->getParentClass());
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,6 +191,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
|
||||||
*
|
*
|
||||||
|
* @return ContainerBuilder The current instance
|
||||||
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
|
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
|
||||||
@ -198,6 +204,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
$this->compiler->addPass($pass, $type);
|
$this->compiler->addPass($pass, $type);
|
||||||
|
|
||||||
$this->addObjectResource($pass);
|
$this->addObjectResource($pass);
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user