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


PHP Wekit::S方法代码示例

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


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

示例1: getUrl

 /** 
  * 获取全站url信息
  *
  * @return obj
  */
 public function getUrl()
 {
     $_consts = Wekit::S('publish');
     foreach ($_consts as $const => $value) {
         if (defined($const)) {
             continue;
         }
         if ($const === 'PUBLIC_URL' && !$value) {
             $value = Wind::getComponent('request')->getBaseUrl(true);
             if (defined('BOOT_PATH') && 0 === strpos(BOOT_PATH, PUBLIC_PATH)) {
                 $path = substr(BOOT_PATH, strlen(PUBLIC_PATH));
                 !empty($path) && ($value = substr($value, 0, -strlen($path)));
             }
         }
         define($const, $value);
     }
     $url = new stdClass();
     $url->base = PUBLIC_URL;
     $url->res = WindUrlHelper::checkUrl(PUBLIC_RES, $url->base);
     $url->css = WindUrlHelper::checkUrl(PUBLIC_RES . '/css/', $url->base);
     $url->images = WindUrlHelper::checkUrl(PUBLIC_RES . '/images/', $url->base);
     $url->js = WindUrlHelper::checkUrl(PUBLIC_RES . '/js/dev/', $url->base);
     $url->attach = WindUrlHelper::checkUrl(PUBLIC_ATTACH, $url->base);
     $url->themes = WindUrlHelper::checkUrl(PUBLIC_THEMES, $url->base);
     $url->extres = WindUrlHelper::checkUrl(PUBLIC_THEMES . '/extres/', $url->base);
     return $url;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:32,代码来源:bootstrap.php

示例2: routerShutdown

 public function routerShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response)
 {
     if ($request->controller == 'Api') {
         require \Yaf\Registry::get('config')->application->phpwind->wekit_bin;
         Wekit::init('phpwind');
         $application = Wind::application('phpwind', Wekit::S());
     }
 }
开发者ID:randy-ran,项目名称:open-api-for-vopi,代码行数:8,代码来源:Wekit.php

示例3: error_reporting

<?php

if (!defined('WEKIT_VERSION')) {
    error_reporting(E_ERROR | E_PARSE);
    require_once WINDID_BOOT . '../wekit.php';
    Wekit::init('windidclient');
    Wind::application('windidclient', Wekit::S());
    $database = (include WINDID_BOOT . 'conf/database.php');
    $windidConfig = (include Wind::getRealPath('WINDID:conf.config.php', true));
    Wind::register(WINDID_PATH . 'service', 'SRV');
} else {
    $windidConfig = Wekit::C('windid');
    if ($windidConfig['windid'] == 'local') {
        $database = Wind::getComponent('db')->getConfig();
        $database['tableprefix'] .= 'windid_';
        $windidConfig['connect'] = 'db';
    } else {
        $database = array('dsn' => 'mysql:host=' . $windidConfig['db.host'] . ';dbname=' . $windidConfig['db.name'] . ';port=' . $windidConfig['db.port'], 'user' => $windidConfig['db.user'], 'pwd' => $windidConfig['db.pwd'], 'charset' => $windidConfig['db.charset'], 'tableprefix' => $windidConfig['db.prefix']);
    }
    $windidConfig['charset'] = Wekit::V('charset');
}
Wind::register(WINDID_PATH . 'service', 'WSRV');
Wind::import('WSRV:base.WindidBaseDao');
Wind::import('WSRV:base.WindidUtility');
Wind::import('WSRV:base.WindidError');
Wind::registeComponent(array('path' => 'WIND:db.WindConnection', 'config' => $database), 'windiddb', 'singleton');
define('WINDID_CONNECT', $windidConfig['connect']);
define('WINDID_SERVER_URL', $windidConfig['serverUrl']);
define('WINDID_CLIENT_ID', $windidConfig['clientId']);
define('WINDID_CLIENT_KEY', $windidConfig['clientKey']);
define('WINDID_CLIENT_CHARSET', $windidConfig['charset']);
开发者ID:chendong0444,项目名称:phpwind,代码行数:31,代码来源:bootstrap.php


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