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


PHP Yaf_Loader::import方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $config = Yaf_Application::app()->getConfig();
     Yaf_Loader::import('L_Wechat.class.php');
     $options = array('token' => $config['wx_token'], 'appid' => $config['wx_appID'], 'appsecret' => $config['wx_appSecret']);
     $this->wxSDK = new L_Wechat($options);
 }
开发者ID:xujunjiepk,项目名称:YOF,代码行数:7,代码来源:Com_Weixin.php

示例2: _initBase

 /**
  * 函数名称:_initBase
  * 功能描述:引入基础base类
  */
 public function _initBase()
 {
     Yaf_Loader::import(BASE_PATH . '/BaseAdminController.php');
     Yaf_Loader::import(BASE_PATH . '/BaseIndexController.php');
     Yaf_Loader::import(BASE_PATH . '/BaseAdminModel.php');
     Yaf_Loader::import(BASE_PATH . '/BaseIndexModel.php');
 }
开发者ID:qiaoweizhen,项目名称:yaf,代码行数:11,代码来源:bootstrap.php

示例3: _initRoutes

 /**
  * [路由设置]
  */
 public function _initRoutes(Yaf_Dispatcher $dispatcher)
 {
     $router = $dispatcher->getRouter();
     //$router->addConfig(Yaf_Registry::get('config')->routes);
     Yaf_Loader::import(APP_CONFIG . '/route.php');
     $router->addConfig($routeConfigs);
 }
开发者ID:zhangxinvip,项目名称:YafUse,代码行数:10,代码来源:Bootstrap.php

示例4: _initDebug

 /**
  * 开启调试输出
  * @method _initDebug
  * @author NewFuture
  */
 public function _initDebug()
 {
     if (Config::get('isdebug')) {
         /*加载 PHP Console Debug模块*/
         Yaf_Loader::import('PhpConsole/__autoload.php');
         $connector = PhpConsole\Connector::getInstance();
         if ($connector->isActiveClient()) {
             Log::write('PHP Console 已经链接', 'INFO');
             $handler = PhpConsole\Handler::getInstance();
             $dispatcher = $connector->getDebugDispatcher();
             $handler->start();
             $connector->setSourcesBasePath(APP_PATH);
             $connector->setServerEncoding('utf8');
             $dispatcher->detectTraceAndSource = true;
             //跟踪信息
             if ($pwd = Config::get('debug.auth')) {
                 $connector->setPassword($pwd);
                 $evalProvider = $connector->getEvalDispatcher()->getEvalProvider();
                 // $evalProvider->disableFileAccessByOpenBaseDir();             // means disable functions like include(), require(), file_get_contents() & etc
                 // $evalProvider->addSharedVar('uri', $_SERVER['REQUEST_URI']); // so you can access $_SERVER['REQUEST_URI'] just as $uri in terminal
                 // $evalProvider->addSharedVarReference('post', $_POST);
                 $connector->startEvalRequestsListener();
             }
         }
         PhpConsole\Helper::register();
     }
 }
开发者ID:derek-chow,项目名称:YunYinService,代码行数:32,代码来源:Debug.php

示例5: __construct

 public function __construct()
 {
     $config = Yaf_Application::app()->getConfig();
     Yaf_Loader::import('L_Wechat');
     $options = array('token' => self::WX_TOKEN, 'appid' => $config['wx_appID'], 'appsecret' => $config['wx_appsecret'], 'access_token' => $config['wx_access_token'], 'expires' => $config['wx_expires']);
     $this->wxSDK = new L_Wechat($options);
 }
开发者ID:GobYang,项目名称:thaidh,代码行数:7,代码来源:Com_Weixin.php

示例6: _initCore

 public function _initCore()
 {
     define('TB_PREFIX', 'zt_');
     define('APP_NAME', 'YOF-DEMO');
     define('LIB_PATH', APP_PATH . '/application/library');
     define('MODEL_PATH', APP_PATH . '/application/model');
     define('FUNC_PATH', APP_PATH . '/application/function');
     define('ADMIN_PATH', APP_PATH . '/application/modules/Admin');
     // CSS, JS, IMG PATH
     define('CSS_PATH', '/css');
     define('JS_PATH', '/js');
     define('IMG_PATH', '/img');
     // Admin CSS, JS PATH
     define('ADMIN_CSS_PATH', '/admin/css');
     define('ADMIN_JS_PATH', '/admin/js');
     Yaf_Loader::import('M_Model.pdo.php');
     Yaf_Loader::import('Helper.class.php');
     Helper::import('Basic');
     Helper::import('Network');
     Yaf_Loader::import('C_Basic.php');
     Yaf_Loader::import(LIB_PATH . '/yar/Yar_Basic.php');
     // header.html and left.html
     define('HEADER_HTML', APP_PATH . '/public/common/header.html');
     define('LEFT_HTML', APP_PATH . '/public/common/left.html');
     // API KEY for api sign
     define('API_KEY', 'THIS_is_OUR_API_keY');
 }
开发者ID:udeth,项目名称:YOF,代码行数:27,代码来源:Bootstrap.php

示例7: _initCore

 public function _initCore()
 {
     define('TB_PK', 'id');
     // 表的主键, 用于 SelectByID 等
     define('TB_PREFIX', 'zt_');
     // 表前缀
     define('APP_NAME', 'YOF-DEMO');
     define('LIB_PATH', APP_PATH . '/application/library/');
     define('MODEL_PATH', APP_PATH . '/application/model');
     define('FUNC_PATH', APP_PATH . '/application/function');
     define('ADMIN_PATH', APP_PATH . '/application/modules/Admin');
     // CSS, JS, IMG PATH
     define('CSS_PATH', '/css');
     define('JS_PATH', '/js');
     define('IMG_PATH', '/img');
     // Admin CSS, JS PATH
     define('ADMIN_CSS_PATH', '/admin/css');
     define('ADMIN_JS_PATH', '/admin/js');
     // 设置自动加载的目录
     ini_set('yaf.library', LIB_PATH);
     // 导入 F_Basic.php 与 F_Network.php
     Helper::import('Basic');
     Helper::import('Network');
     Yaf_Loader::import('C_Basic.php');
     Yaf_Loader::import(LIB_PATH . '/yar/Yar_Basic.php');
     // header.html and left.html
     define('HEADER_HTML', APP_PATH . '/public/common/header.html');
     define('LEFT_HTML', APP_PATH . '/public/common/left.html');
     // API KEY for api sign
     define('API_KEY', 'THIS_is_OUR_API_keY');
 }
开发者ID:xinuxZ,项目名称:YOF,代码行数:31,代码来源:Bootstrap.php

示例8: _initPlugin

 function _initPlugin(Yaf_Dispatcher $dispatcher)
 {
     Yaf_Loader::import('vendor/autoload.php');
     $dispatcher->registerPlugin(new Plugin_Init());
     $dispatcher->registerPlugin(new Plugin_Smarty());
     $dispatcher->registerPlugin(new LoginPlugin());
 }
开发者ID:Zjmainstay,项目名称:php-doc-management,代码行数:7,代码来源:Bootstrap.php

示例9: _initSmarty

 public function _initSmarty(Yaf_Dispatcher $dispatcher)
 {
     /* init smarty view engine */
     Yaf_Loader::import("Smarty/Adapter.php");
     $smarty = new Smarty_Adapter(null, Yaf_Application::app()->getConfig()->smarty);
     $dispatcher->setView($smarty);
 }
开发者ID:gangjun911,项目名称:yaf-examples,代码行数:7,代码来源:Bootstrap.php

示例10: _initConfig

 public function _initConfig(\Yaf_Dispatcher $dispatcher)
 {
     /*{{{*/
     $this->config = Yaf_Application::app()->getConfig()->toArray();
     Yaf_Registry::set('configarr', $this->config);
     // 加载默认定义
     \Yaf_Loader::import(APP_PATH . '/conf/defines.inc.php');
 }
开发者ID:xujunjiepk,项目名称:yaf_base,代码行数:8,代码来源:Bootstrap.php

示例11: __construct

 function __construct()
 {
     Yaf_Loader::import('qiniu/io.php');
     Yaf_Loader::import('qiniu/rs.php');
     Yaf_Loader::import('qiniu/config.php');
     $this->bucket = $bucket;
     $this->accessKey = $accessKey;
     $this->secretKey = $secretKey;
 }
开发者ID:GobYang,项目名称:thaidh,代码行数:9,代码来源:L_Qiniu.class.php

示例12: __construct

 function __construct()
 {
     Yaf_Loader::import('qiniu/io.php');
     Yaf_Loader::import('qiniu/rs.php');
     $config = Yaf_Application::app()->getConfig();
     $this->bucket = $config['qiniu_bucket'];
     $this->accessKey = $config['qiniu_accessKey'];
     $this->secretKey = $config['qiniu_secretKey'];
 }
开发者ID:udeth,项目名称:YOF,代码行数:9,代码来源:L_Qiniu.class.php

示例13: autoload

 public static function autoload($class)
 {
     if (strpos($class, 'Builder') === strlen($class) - 7) {
         Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));
     } else {
         if (strpos($class, 'Halo') === 0) {
             Yaf_Loader::import(sprintf('%s/library/halo/%s.php', APPLICATION_PATH, $class));
         }
     }
 }
开发者ID:YexuanGuo,项目名称:php-cms,代码行数:10,代码来源:LocalAutoLoader.php

示例14: loadEssentials

 public static function loadEssentials()
 {
     Yaf_Loader::import(sprintf('%s/yaf/YafController.php', LIB_PATH));
     Yaf_Loader::import(sprintf('%s/yaf/YafDebug.php', LIB_PATH));
     Yaf_Loader::import(sprintf('%s/yaf/YafView.php', LIB_PATH));
     Yaf_Loader::import(sprintf('%s/yaf/LocalAutoLoader.php', LIB_PATH));
     Yaf_Loader::import(sprintf('%s/yaf/yar.php', LIB_PATH));
     Yaf_Loader::import(sprintf('%s/yaf/YafController.php', LIB_PATH));
     LocalAutoLoader::register();
 }
开发者ID:YexuanGuo,项目名称:php-cms,代码行数:10,代码来源:SystemConfig.php

示例15: getInstance

 public static function getInstance()
 {
     if (!self::$instance) {
         $file_system = Yaf_Registry::get('config')->file->file_system;
         if (!empty($file_system) && file_exists(dirname(__FILE__) . '/' . $file_system . '.php')) {
             Yaf_Loader::import(dirname(__FILE__) . '/' . $file_system . '.php');
             self::$instance = new $file_system();
         }
     }
     return self::$instance;
 }
开发者ID:EGGISGOOD,项目名称:php_tool,代码行数:11,代码来源:File.php


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