예제 #1
0
 function package($args)
 {
     $package_name = array_shift($args);
     $package = MVC_Router::getInstance()->get_package_for($package_name);
     if ($package) {
         if (method_exists($package, 'get_permission') && !Permission::has_permission($package->get_permission())) {
             $this->redirect(ADMIN_URL);
         }
         $controller = $package->get_admin_controller();
         define('PACKAGE_URL', $this->get_package_uri(true) . "package/{$package_name}/");
         $package->set_control_dir($package->get_admin_control_dir());
         $package->set_admin_defaults();
         echo $package->auto_route($args);
         //			echo call_user_func_array(array($package, $controller), $args);
     }
 }
예제 #2
0
 public function __construct()
 {
     MVC_Router::getInstance()->add_library($this->get_package_dir() . 'classes');
     define('ADMIN_URL', $this->get_package_uri(true));
     Mvc_Fileserver::get_instance()->add_location(__DIR__ . '/public');
 }
예제 #3
0
 public function __construct()
 {
     MVC_Router::getInstance()->add_library($this->get_package_dir() . 'classes');
 }
예제 #4
0
<?php

MVC_Router::getInstance()->register_package_directory(__DIR__ . '/modules');