-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c49e7f6
commit e873b2e
Showing
3 changed files
with
2 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
<?php | ||
use Magento\Framework\Component\ComponentRegistrar as R; | ||
R::register(R::MODULE, 'Inkifi_Core', __DIR__); | ||
// 2017-04-25, 2017-12-13 | ||
// Unfortunately, I have not found a way to make this code reusable among my modules. | ||
// I tried to move this code to a `/lib` function like df_lib(), but it raises a «chicken and egg» problem, | ||
// because Magento runs the `registration.php` scripts before any `/lib` functions are initalized, | ||
// whereas the `/lib` functions are initalized from the `registration.php` scripts. | ||
$base = dirname(__FILE__); /** @var string $base */ | ||
if (is_dir($libDir = "{$base}/lib")) { /** @var string $libDir */ | ||
// 2015-02-06 | ||
// array_slice removes «.» and «..». | ||
// http://php.net/manual/function.scandir.php#107215 | ||
foreach (array_slice(scandir($libDir), 2) as $c) {require_once "{$libDir}/{$c}";} | ||
} | ||
R::register(R::MODULE, 'Inkifi_Core', __DIR__); |