Esempio n. 1
0
 /**
  *
  * The routingMethod starts the session calls the RoutingEngine and echo the returnValue
  *
  * @return void
  */
 private static function routing()
 {
     //start session and echo the Routing, else it echo that the user is in the root
     session_start();
     $routingEngine = new RoutingEngine();
     echo $routingEngine->handleRouting(self::$uri);
 }
Esempio n. 2
0
 /**
  * 
  * The importControllerMethod imports an Controller through the Routing
  *
  * @param string $subString, $output
  * 
  * @return string
  */
 private function importController($subString, $output)
 {
     //explode the complete value to get second parameter
     $subStrings = explode(' ', trim($subString));
     //call  the handleRoutingMethod from RoutingEngine to get the Value
     $routingEngine = new RoutingEngine();
     $replace = $routingEngine->handleRouting($subStrings[1]);
     //replace the templateCall with the Value
     $pattern = '/{%' . $subString . '%}/';
     $output = preg_replace($pattern, $replace, $output);
     return $output;
 }