Hirdetés
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- AMD Navi Radeon™ RX 9xxx sorozat
- Az elmúlt 30 év legjobb processzorai
- Kormányok / autós szimulátorok topikja
- Pánik a memóriapiacon
- CES 2026: nagyra nőtt 120 Hz-en a Dell
- Milyen billentyűzetet vegyek?
- Melyik tápegységet vegyem?
- Milyen széket vegyek?
- VR topik
Ú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
- BASEUS Compact Quick Charger 2xUSB USB-C PD 3A 30W fekete
- Telefon felváráslás!! iPhone 15/iPhone 15 Plus/iPhone 15 Pro/iPhone 15 Pro Max
- BESZÁMÍTÁS! MSI B550M R5 5600X 16GB DDR4 512GB SSD RTX 3070 8GB Lian Li Lancool 207 GIGABYTE 750W
- GYÖNYÖRŰ iPhone 12 Mini 128GB Purple-1 ÉV GARANCIA - Kártyafüggetlen, MS3630
- Xiaomi Redmi Note 11 Pro 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


