- Google Pixel topik
- Samsung Galaxy A56 - megbízható középszerűség
- Új telefont és tabletet mutatott be a Telekom
- Milyen okostelefont vegyek?
- MediaTek alapokon a Honor Magic8 Mini?
- Mobil flották
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Samsung Galaxy S23 Ultra - non plus ultra
- Netfone
- Samsung Z Fold7 vs. Honor Magic V5 - melyik a jobb?
Új hozzászólás Aktív témák
-
Brown ügynök
senior tag
válasz
Tele von Zsinór #9297 üzenetére
index.php
require_once __DIR__.'/System/plugins/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
use System\Controller\PageRouteController;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'System' => __DIR__ ,
));
$loader->register();
$c = new PageRouteController();
$c->getRouteAction();PageRouteController.php
namespace System\Controller;
use System\Controller\MainController;
class PageRouteController extends MainController
{
public function __construct (){
parent::__construct();
}
public function getRouteAction() {
$routes = $this->routes; // tömb az útvonalakkal
if ( $this->queryString) {
$VarsKey = $this->getRequestVars();
$this->uri = (mb_substr($this->uri, 0, -mb_strlen(strrchr($this->uri, "/" )) + 1) );
foreach ($VarsKey as $key => $val) {
$this->uri .= '{' . $key . '}';
}
}
foreach ($routes as $route) {
if ($this->uri == $route["uri"]) {
$controller = new $route["controller"];
$action = $route["action"];
return $controller->$action();
}
}
}
Új hozzászólás Aktív témák
- Home server / házi szerver építése
- Intel Core i3 / i5 / i7 / i9 10xxx "Comet Lake" és i3 / i5 / i7 / i9 11xxx "Rocket Lake" (LGA1200)
- BestBuy topik
- World of Tanks - MMO
- Melyik hordozható audiolejátszót (DAP, MP3, stb.) vegyem?
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Luck Dragon: Asszociációs játék. :)
- Google Pixel topik
- Path of Exile 2
- Milyen monitort vegyek?
- További aktív témák...
- BESZÁMÍTÁS! ASUS ROG STRIX Z270G Gaming WiFi alaplap garanciával hibátlan működéssel
- Telefon felvásárlás!! iPhone 15/iPhone 15 Plus/iPhone 15 Pro/iPhone 15 Pro Max
- HP 15 Zbook Studio G8 FHD IPS i7-11850H vPro 32GB 512GB SSD Nvidia A2000 Studio Win11 Pro Garancia
- Bomba ár! Dell Latitude E5570 Touch - i5-6300U I 8GB I 256SSD I 15,6" FHD I HDMI I CAM I W10 I Gari
- Xiaomi Redmi Note 13 Pro 5G 256GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: FOTC
Város: Budapest