for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace kalanis\kw_modules\Loaders\KwDi;
use kalanis\kw_modules\Loaders\TSeparate;
/**
* Class Loader
* @package kalanis\kw_modules\Loaders\KwDi
* Load modules data from defined targets
* @codeCoverageIgnore contains external autoloader
*
* Paths:
* /modules/{module_name}/php-src/Controllers/{module_name}.php as init
* /modules/{module_name}/php-src/Lib/* as next libraries
* Namespaces:
* \KWCMS\modules\{module_name}\Controllers\{module_name} as init
* \KWCMS\modules\{module_name}\Lib\ as next libraries
* Name is passed as first big and the rest little ( ucfirst(strtolower($x)) )
* - lookup by curly braces
*/
class Loader extends ALoader
{
use TSeparate;
protected function getClassName(array $path): string
list($target, $constructPath) = $this->separateModule($path);
return sprintf('\KWCMS\modules\%s\Controllers\%s', $target, $constructPath);
}