Example #1
0
/**
 * wrapper for config instance creation so the instance does not live in global
 * scope 
 */
function bootstrap($configuration_array)
{
    $config = new \Pste\Config($configuration_array);
    \Pste\Registry::getInstance()->config = $config;
    $route = new \Pste\Route();
    $route->setTemplatePath($config->template);
    \Pste\Registry::getInstance()->route = $route;
}
Example #2
0
 /**
  *
  * @return \Pste\Route 
  */
 public function route()
 {
     $route = \Pste\Registry::getInstance()->route;
     if (!$route instanceof \Pste\Route) {
         $route = new \Pste\Route();
         $route->setTemplatePath(\Pste\Registry::getInstance()->config->template);
         \Pste\Registry::getInstance()->route = $route;
     }
     return $route;
 }