public function generateUrlPath($dados) { list($module, $controller, $action) = explode(":", $dados); $modules = Module::getModules(); $url = "http://" . $_SERVER['HTTP_HOST']; foreach ($modules as $key => $value) { $url .= $value == $module ? $key : ''; } $url .= "/" . strtolower($controller) . "/" . strtolower($action); return $url; }
private function getConfig() { $modules = Module::getModules(); $array = array(); foreach ($modules as $key => $value) { $array[] = "../App/" . $value . "/Entity"; } $isDevMode = true; $config = Setup::createAnnotationMetadataConfiguration($array, $isDevMode); return $config; }
public static function getModule() { $modules = Module::getModules(); $url = explode('/', self::url()); foreach ($modules as $key => $value) { $keys = str_replace('/', "", $key); if ($keys == $url[1]) { return array($key => ucfirst($value)); } } return array("/" => ucfirst($modules['/'])); }