AclHandler::getInstance();
$requestHandler = RequestHandler::getInstance();
+ $requestHandler->setDB(self::getDB());
$requestHandler->setRoutes($module);
$requestHandler->handle();
}
<?php
namespace dns\system;
use dns\system\cache\builder\ControllerCacheBuilder;
+use dns\system\helper\IDatabase;
+use dns\system\helper\TDatabase;
use dns\system\route\Request;
use dns\system\route\Segment;
use Zend\Router\Http\RouteMatch;
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @copyright 2013-2016 Jan Altensen (Stricted)
*/
-class RequestHandler extends SingletonFactory {
+class RequestHandler extends SingletonFactory implements IDatabase {
+ use TDatabase;
+
protected $router = null;
protected $apiModule = false;
}
try {
- new $className();
+ $page = new $className();
+ if ($page instanceof IDatabase) {
+ $page->setDB($this->db);
+ }
}
catch (\Exception $e) {
if ($e->getCode() == 404) {