Exemplo n.º 1
0
 protected static function getApnHelper()
 {
     if (is_null(self::$apnHelper)) {
         self::$apnHelper = new APNHelper(file_get_contents(AppConfig::get("apple.development_file")), 'gateway.sandbox.push.apple.com', 2195);
     }
     return self::$apnHelper;
 }
Exemplo n.º 2
0
 public function getInstance($name = 'master')
 {
     if (!isset(self::$instances[$name])) {
         $paramPath = 'db.medoo.' . $name;
         self::$instances[$name] = new \medoo(['database_type' => AppConfig::get($paramPath . '.database_type'), 'database_name' => $paramPath . '.database_name', 'server' => $paramPath . '.server', 'username' => $paramPath . '.username', 'password' => $paramPath . '.password', 'port' => $paramPath . '.port', 'charset' => $paramPath . '.charset', 'option' => $paramPath . '.option']);
     }
     return self::$instances[$name];
 }
Exemplo n.º 3
0
 public static function mapAllCTL()
 {
     $router = new \AltoRouter();
     $basePath = AppConfig::get("route.base_path");
     if (!is_null($basePath) && trim($basePath) != "") {
         $router->setBasePath($basePath);
     }
     $ctls = self::readCTL();
     foreach ($ctls as $ctl) {
         $router->map(implode('|', $ctl['methods']), $ctl['uri'], array('c' => $ctl['controller'], 'a' => $ctl['action']));
     }
     return $router;
 }
Exemplo n.º 4
0
 public static function init()
 {
     self::$dbhost = \Main\AppConfig::get('crud.dbhost');
     self::$dbname = \Main\AppConfig::get('crud.dbname');
     self::$dbuser = \Main\AppConfig::get('crud.dbuser');
     self::$dbpass = \Main\AppConfig::get('crud.dbpass');
     self::$theme = \Main\AppConfig::get('crud.theme');
     self::$language = \Main\AppConfig::get('crud.language');
     self::$dbencoding = \Main\AppConfig::get('crud.dbencoding');
     self::$db_time_zone = \Main\AppConfig::get('crud.db_time_zone');
     self::$mbencoding = \Main\AppConfig::get('crud.mbencoding');
     self::$editor_url = \Main\Helper\URL::absolute("/public/editors/tinymce/tinymce.min.js");
 }
Exemplo n.º 5
0
<?php

use Main\Helper;
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>
        <?php 
echo \Main\AppConfig::get("application.title");
?>
    </title>
    <link href="<?php 
echo Helper\URL::absolute("/public/css/core.css");
?>
" rel="stylesheet">
    <!-- Bootstrap -->
    <link href="<?php 
echo Helper\URL::absolute("/public/css/bootstrap.min.css");
?>
" rel="stylesheet">
    <link href="<?php 
echo \Main\Helper\URL::absolute("/");
?>
public/css/iconmoon.css" rel="stylesheet" media="screen">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
Exemplo n.º 6
0
 public static function share($url)
 {
     return AppConfig::get("application.share_url") . $url;
 }
Exemplo n.º 7
0
 public static function warning($error)
 {
     error_log($error, null, AppConfig::get('log.warning'));
 }