当前位置: 首页>>代码示例>>PHP>>正文


PHP C::s方法代码示例

本文整理汇总了PHP中C::s方法的典型用法代码示例。如果您正苦于以下问题:PHP C::s方法的具体用法?PHP C::s怎么用?PHP C::s使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在C的用法示例。


在下文中一共展示了C::s方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pre

 public function pre()
 {
     $this->user = Authenticate::session();
     if (!is_a($this->user, 'Kadmin') || $this->user->getType() != 'admin') {
         throw new Exception('Not Authorized', 401);
     }
     $this->targetLanguage = 'en';
     C::s('LANG_DIR', realpath(ROOTDIR . '../locale/'));
     $this->path = C::g('LANG_DIR') . '/' . C::g('LANG_AVAILABLE', $this->targetLanguage) . '/LC_MESSAGES/';
 }
开发者ID:monkeytie,项目名称:korona,代码行数:10,代码来源:translate.ctrl.php

示例2: go

 /**
  * Init a routing algo
  * @param string  $from      URL source if not provide, Route::go will determine the good route from $_SERVER parameter
  * @return mixed[]
  */
 public static function go($published = true, $lang = 'FR', $host = null)
 {
     $host = !is_string($host) ? $_SERVER['HTTP_HOST'] : $host;
     C::s('FULLURL', 'http://' . $host);
     if (array_key_exists('HTTPS', $_SERVER)) {
         C::s('FULLURL', 'https://' . $host);
     }
     $uri = parse_url($_SERVER['REQUEST_URI']);
     if (substr($uri['path'], -1) == '/') {
         $uri['path'] = substr($uri['path'], 0, -1);
     }
     $route = self::getRoute($host, $uri['path'], $_SERVER['REQUEST_METHOD']);
     if (!is_a($route, 'KLib\\Router')) {
         //PAGE
         $data = \Page::getByUrl($host, $uri['path'], $lang, $published);
         if (!is_a($data, 'Page') && $lang != C::g('DEFAULT_LANG')) {
             $data = \Page::getByUrl($host, $uri['path'], C::g('DEFAULT_LANG'), $published);
         }
         if (!is_a($data, 'Page')) {
             throw new \Exception('PAGE NOT FOUND', 404);
         }
         $route = new Self($data->getBaseUrl(), $uri['path'], $data->getAction(), $data->getMethod(), array_merge($_GET, array('page' => $data)));
     }
     if (!is_a($route, 'KLib\\Router')) {
         throw new \Exception('PAGE NOT FOUND', 404);
     }
     return BaseController::run($route->getController(), $route->getAction(), $route->getArgs());
 }
开发者ID:monkeytie,项目名称:korona,代码行数:33,代码来源:routerkorona.class.php

示例3: s

<?php

class C
{
    static final function s()
    {
        print "Called class: " . get_called_class() . "\n";
    }
}
class D extends C
{
    public function m()
    {
        $this->s();
    }
}
$d = new D();
$d->m();
C::s();
$c = new C();
$c->s();
get_called_class();
D::m();
开发者ID:badlamer,项目名称:hhvm,代码行数:23,代码来源:bug47054.php

示例4: array

<?php

C::s('HTMLCONTROLLER_DEFAULT_META', array('Content-type' => array('charset' => 'utf-8'), 'robots' => array('name' => 'robots', 'content' => 'index,follow'), 'google' => array('name' => 'google', 'content' => 'notranslate'), 'googlebot' => array('name' => 'googlebot', 'content' => 'index'), 'og:title' => array('name' => 'og:locale', 'content' => 'Korona'), 'og:locale' => array('name' => 'og:locale', 'content' => 'fr_FR'), 'og:type' => array('name' => 'og:type', 'content' => 'article'), 'og:url' => array('name' => 'og:locale', 'content' => 'https://github.com/monkeytie/korona'), 'og:url' => array('name' => 'og:image', 'content' => 'https://github.com/monkeytie/korona/blob/master/static/img/logo.png?raw=true'), 'og:site_name' => array('name' => 'og:site_name', 'content' => 'Korona'), 'twitter:card' => array('name' => 'twitter:card', 'content' => 'summary'), 'twitter:site' => array('name' => 'twitter:site', 'content' => '@MtKorona'), 'twitter:domain' => array('name' => 'twitter:domain', 'content' => 'Korona'), 'twitter:creator' => array('name' => 'twitter:creator', 'content' => '@MtKorona')));
开发者ID:monkeytie,项目名称:korona,代码行数:3,代码来源:metas.inc.php

示例5: array

<?php

C::s('HTMLCONTROLLER_DEFAULT_CSS', array('static/test.css'));
C::s('HTMLCONTROLLER_DEFAULT_JS', array('static/test.js'));
C::s('HTMLCONTROLLER_DEFAULT_META', array('Content-type' => array('charset' => 'utf-8'), 'robots' => array('name' => 'robots', 'content' => 'index,follow'), 'google' => array('name' => 'google', 'content' => 'notranslate'), 'googlebot' => array('name' => 'googlebot', 'content' => 'index'), 'og:locale' => array('property' => 'og:locale', 'content' => 'fr_FR'), 'og:type' => array('property' => 'og:type', 'content' => 'article'), 'og:site_name' => array('property' => 'og:site_name', 'content' => 'Monkey tie recrutement affinitaire'), 'article:publisher' => array('property' => 'article:publisher', 'content' => 'https://www.facebook.com/MonkeyTie'), 'twitter:card' => array('name' => 'twitter:card', 'content' => 'summary'), 'twitter:site' => array('name' => 'twitter:site', 'content' => '@Monkey_Tie'), 'twitter:domain' => array('name' => 'twitter:domain', 'content' => 'Monkey tie recrutement affinitaire'), 'twitter:creator' => array('name' => 'twitter:creator', 'content' => '@Monkey_Tie')));
开发者ID:monkeytie,项目名称:korona,代码行数:5,代码来源:static.inc.php

示例6: array

<?php

require_once __DIR__ . '/error.ctrl.php';
require_once __DIR__ . '/default.ctrl.php';
require_once __DIR__ . '/page.ctrl.php';
require_once __DIR__ . '/kadmin.ctrl.php';
require_once __DIR__ . '/list.ctrl.php';
require_once __DIR__ . '/menu.ctrl.php';
require_once __DIR__ . '/config.ctrl.php';
require_once __DIR__ . '/seo.ctrl.php';
require_once __DIR__ . '/block.ctrl.php';
require_once __DIR__ . '/translate.ctrl.php';
C::s('CRTL_ROUTES', array('default' => 'DefaultController', 'error' => 'ErrorController', 'page' => 'PageController', 'list' => 'ListController', 'kadmin' => 'KadminController', 'menu' => 'MenuController', 'config' => 'ConfigController', 'seo' => 'SeoController', 'block' => 'BlockController', 'translate' => 'TranslateController'), true);
开发者ID:monkeytie,项目名称:korona,代码行数:13,代码来源:ctrl.inc.php

示例7: define

<?php

define('APPNAME', 'kadmin');
!defined('SMARTY_COMPILE_DIR') ? define('SMARTY_COMPILE_DIR', '../../cache/Smarty/kadmin/templates_c/') : true;
!defined('SMARTY_CACHE_DIR') ? define('SMARTY_CACHE_DIR', '../../cache/Smarty/kadmin/cache/') : true;
!defined('SMARTY_TEMPLATE_DIR') ? define('SMARTY_TEMPLATE_DIR', './views/') : true;
require_once __DIR__ . '/../../gom-core/global.inc.php';
require_once __DIR__ . '/../konfig.inc.php';
require_once __DIR__ . '/../kore/lib/lib.inc.php';
require_once __DIR__ . '/../kore/list.inc.php';
require_once __DIR__ . '/static/static.inc.php';
require_once __DIR__ . '/kontroller/ctrl.inc.php';
require_once __DIR__ . '/router.inc.php';
C::s('MAIN_VIEW_MODELE', __DIR__ . '/../views/tpl/modele/');
/**
 * Autoloader Klasses
 *
 * @param string $str
 *
 * @return null
 */
function autoLoadKlasses($str)
{
    if (is_file(__DIR__ . '/../kore/klasses/' . strtolower($str) . '.class.php')) {
        require_once __DIR__ . '/../kore/klasses/' . strtolower($str) . '.class.php';
    }
}
spl_autoload_register('autoLoadKlasses');
/**
 * Autoloader KAdmin Klasses
 *
开发者ID:monkeytie,项目名称:korona,代码行数:31,代码来源:global.inc.php


注:本文中的C::s方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。