8000 [WIP][HttpKernel] Expose bundle hierarchy/metadata as a service by ro0NL · Pull Request #19594 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WIP][HttpKernel] Expose bundle hierarchy/metadata as a service #19594

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
renamed to BundleMetadata
  • Loading branch information
ro0NL committed Aug 11, 2016
commit 408972a06dc38ceb43d79f2660206aeef869f580
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
namespace Symfony\Component\HttpKernel\Bundle;

/**
* Bundle value object.
* Value object representing bundle metadata.
*
* @author Roland Franssen <franssen.roland@gmail.com>
*/
final class BundleVO
final class BundleMetadata
{
private $name;
private $namespace;
Expand All @@ -27,13 +27,13 @@ final class BundleVO
/**
* Constructor.
*
* @param string $name
* @param string $namespace
* @param string $className
* @param string $path
* @param BundleVO|null $parent
* @param string $name
* @param string $namespace
* @param string $className
* @param string $path
* @param BundleMetadata|null $parent
*/
public function __construct($name, $namespace, $className, $path, BundleVO $parent = null)
public function __construct($name, $namespace, $className, $path, BundleMetadata $parent = null)
{
$this->name = $name;
$this->className = $className;
Expand Down Expand Up @@ -84,7 +84,7 @@ public function getPath()
/**
* Get parent bundle, if any.
*
* @return BundleVO|null
* @return BundleMetadata|null
*/
public function getParent()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Bundle\BundleVO;
use Symfony\Component\HttpKernel\Bundle\BundleMetadata;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
Expand Down Expand Up @@ -518,7 +518,7 @@ protected function getKernelParameters()
}
if (!isset($bundles[$name])) {
$bundles[$name] = get_class($bundle);
$bundleHierarchy[$name] = new BundleVO($name, $bundle->getNamespace(), $bundles[$name], $bundle->getPath(), isset($bundleHierarchy[$parent]) ? $bundleHierarchy[$parent] : null);
$bundleHierarchy[$name] = new BundleMetadata($name, $bundle->getNamespace(), $bundles[$name], $bundle->getPath(), isset($bundleHierarchy[$parent]) ? $bundleHierarchy[$parent] : null);
++$numProcessedBundles;
}
}
Expand Down
0