當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。