8000 [DependencyInjection] Return self for add... by ruian · Pull Request #6028 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] Return self for add... #6028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9EEC
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public function setResources(array $resources)
*
* @param object $object An object instance
*
* @return ContainerBuilder The current instance
*
* @api
*/
public function addObjectResource($object)
Expand All @@ -153,6 +155,8 @@ public function addObjectResource($object)
do {
$this->addResource(new FileResource($parent->getFileName()));
} while ($parent = $parent->getParentClass());

return $this;
}

/**
Expand Down Expand Up @@ -187,6 +191,8 @@ public function loadFromExtension($extension, array $values = array())
* @param CompilerPassInterface $pass A compiler pass
* @param string $type The type of compiler pass
*
* @return ContainerBuilder The current instance
*
* @api
*/
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
Expand All @@ -198,6 +204,8 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig:
$this->compiler->addPass($pass, $type);

$this->addObjectResource($pass);

return $this;
}

/**
Expand Down
0