Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit16165bd

Browse files
committed
MicroKernelTrait::getBundlesPath
1 parent56d87a8 commit16165bd

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎configuration/multiple_kernels.rst‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,6 @@ files so they don't collide with the files from ``src/Kernel.php``::
9090
{
9191
use MicroKernelTrait;
9292

93-
public function registerBundles()
94-
{
95-
// load only the bundles strictly needed for the API
96-
$contents = require $this->getProjectDir().'/config/api_bundles.php';
97-
foreach ($contents as $class => $envs) {
98-
if ($envs[$this->environment] ?? $envs['all'] ?? false) {
99-
yield new $class();
100-
}
101-
}
102-
}
103-
10493
public function getProjectDir(): string
10594
{
10695
return \dirname(__DIR__);
@@ -133,6 +122,11 @@ files so they don't collide with the files from ``src/Kernel.php``::
133122
$confDir = $this->getProjectDir().'/config/api';
134123
// ... load only the config routes strictly needed for the API
135124
}
125+
126+
private function getBundlesPath(): string
127+
{
128+
return $this->getProjectDir().'/config/api_bundles.php';
129+
}
136130
}
137131

138132
Step 3) Define the Kernel Configuration

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp