public function __construct(Config $cfg, AbstractModule $parent = null, array $injections = null) { //Add options for a General set. $cfg->addKnownOptions(['contentType' => 'text/html', 'modules' => [], 'modulesDir' => 'modules', 'publicDir' => '../public', 'servePublicFiles' => true, 'moduleClassName' => __CLASS__, 'autoload' => false, 'return' => false]); //Add options for a Db (database) set. $cfg->addKnownOptions('db', ['driver' => 'pdo_mysql', 'username' => 'root', 'password' => '', 'hostname' => 'localhost', 'port' => '3306', 'charset' => 'utf8', 'dbname' => 'IploxApp']); $cfg->addKnownOptions('routes', array()); parent::__construct($cfg); // The parent module $this->parent = $parent; // The children modules $this->children = []; // Pass this objects to the children submodules $this->injections = empty($injections) ? [] : $injections; // The router of this module $this->router = new Router(); }