Ejemplo n.º 1
0
 private static function _init()
 {
     self::$objs['benchmark'] = new benchmark();
     self::$objs['config'] = new Config();
     self::$objs['lang'] = new Lang();
     self::$objs['uri'] = URI::getInstance();
     self::$objs['view'] = new View();
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->auth = Auth::getInstance();
     if (!$this->auth->hasIdentity()) {
         $this->redirect('/');
     }
     $this->session = \Uno\Session::getInstance();
     $current = \URI::getInstance()->segment(2);
     $this->template->header = new \View('header');
     $topmenu = array(array('name' => _('Dashboard'), 'link' => '/admin', 'active' => '' == $current), array('name' => _('Menus'), 'link' => '/admin/menus', 'active' => 'menus' == $current), array('name' => _('Layouts'), 'link' => '', 'active' => 'layouts' == $current), array('name' => _('Widgets'), 'link' => '', 'active' => 'widgets' == $current), array('name' => _('Modules'), 'link' => '/admin/modules', 'active' => strpos($current, 'module') !== FALSE));
     $this->template->header->topmenu = $topmenu;
     $this->template->jscript('/admin/index/resource/admin.js');
 }
Ejemplo n.º 3
0
 public static function OpenForm($action = NULL, $method = 'post', $upload = FALSE, array $attribs = array())
 {
     if (NULL === $action) {
         $action = \URI::getInstance()->current();
     }
     $buf = '<form action="' . $action . '" method="' . $method . '"';
     if ($upload) {
         $buf .= ' enctype="multipart/form-data"';
     }
     foreach ($attribs as $key => $val) {
         $buf .= " {$key}=\"{$val}\"";
     }
     $buf .= '>';
     echo $buf . "\n";
 }
Ejemplo n.º 4
0
function getUrlString()
{
    $uri = URI::getInstance();
    return $uri->toString();
}
Ejemplo n.º 5
0
 public function __construct()
 {
     $this->uri = URI::getInstance();
     $this->request = Request::getInstance();
     $this->input = Input::getInstance();
 }
Ejemplo n.º 6
0
 /**
  * @menu Settings
  */
 public function settings()
 {
     var_dump(__METHOD__, \URI::getInstance()->current());
 }