8000 added comments · symfony/symfony@799efa9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 799efa9

Browse files
committed
added comments
1 parent e274178 commit 799efa9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Symfony/Component/De 10000 pendencyInjection/Loader/Configurator/ContainerConfigurator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ final public function extension(string $namespace, array $config)
6363

6464
/**
6565
* @param string $namespace Example: "framework", "Symfony\Config\FrameworkConfig"
66+
* or string to a class implementing ConfigBuilderInterface.
6667
*/
6768
final public function extensionBuilder(string $namespace)
6869
{
@@ -71,8 +72,10 @@ final public function extensionBuilder(string $namespace)
7172
}
7273

7374
if (class_exists($namespace) && is_subclass_of($namespace, ConfigBuilderInterface::class)) {
75+
// If class exists and implements ConfigBuilderInterface
7476
return new $namespace();
7577
} elseif ('Symfony\\Config\\' === substr($namespace, 0, 15)) {
78+
// Else, see if it starts with Symfony\Config\ and try to get the extension alias.
7679
$namespace = Container::underscore(substr($namespace, 15, strpos($namespace, '\\', 15) - 15));
7780
}
7881

src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public function supports($resource, string $type = null)
7575
return 'php' === $type;
7676
}
7777

78+
/**
79+
* Resolve the parameters to the $callback and execute it.
80+
*/
7881
private function executeCallback(callable $callback, ContainerConfigurator $containerConfigurator, string $path)
7982
{
8083
if (!$callback instanceof \Closure) {

0 commit comments

Comments
 (0)
0