for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php /** MicroModule */
namespace Micro\Mvc;
use Micro\Base\Exception;
use Micro\Base\Injector;
use Micro\base\Kernel;
use Micro\Base\KernelInjector;
/**
* Class Module
*
* @author Oleg Lunegov <[email protected]>
* @link https://github.com/linpax/microphp-framework
* @copyright Copyright (c) 2013 Oleg Lunegov
* @license https://github.com/linpax/microphp-framework/blob/master/LICENSE
* @package Micro
* @subpackage Mvc
* @version 1.0
* @since 1.0
* @abstract
*/
abstract class Module
{
* @access public
* @result void
* @throws Exception
public function __construct()
/** @var Kernel $kernel */
$kernel = (new KernelInjector)->build();
$path = dirname(
str_replace(['\\', 'App'], ['/', $kernel->getAppDir()], get_called_class())
).'/config.php';
if (file_exists($path)) {
new Injector($path);
}