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


PHP Load::dependence方法代码示例

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


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

示例1: translate

 function translate($lang = 'ru')
 {
     $config = App;
     $content = ob_get_contents();
     ob_end_clean();
     if (self::$active) {
         self::$locale = self::getAppLocale($lang);
         preg_match_all(LOCALE_TEMPLATE, $content, $mathes);
         if (sizeof($mathes[1]) > 0) {
             foreach ($mathes[1] as $word) {
                 if (array_key_exists($word, self::$locale)) {
                     $content = str_replace(sprintf(LOCALE_TEMPLATE_CHANGE, $word), self::$locale[$word], $content);
                 }
             }
         }
     }
     if (($selector = Request::post('html_element')) || ($selector = Request::get('html_element'))) {
         Load::dependence('simple_html_dom');
         $html = str_get_html($content);
         $elements = $html->find($selector);
         if (sizeof($elements) > 0) {
             echo $elements[0]->innertext;
         } else {
             echo $content;
         }
     } else {
         echo $content;
     }
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:29,代码来源:Language.class.php

示例2: sessionSet

 static function sessionSet()
 {
     Load::dependence('nodatabase');
     $nodatabase = Load::$dependences['nodatabase'];
     $nodatabase->create('sessions');
     self::$session_id = md5(self::ip());
     self::createSession();
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:8,代码来源:Request.class.php

示例3: run

 public static function run($event, $data = array(), $iso = 'ru')
 {
     $eventList = self::getEventList();
     if (!$eventList[$event]) {
         return false;
     }
     $model = connectionNotificationModel::create();
     $notification = $model->getEvent($event);
     Load::dependence('smarty');
     $smarty = Load::$dependences['smarty'];
     foreach ($data as $key => $value) {
         $smarty->assign($key, $value);
     }
     foreach ($notification as $item) {
         $to = $smarty->fetch('string:' . $item['to']);
         $title = $smarty->fetch('string:' . $item[$iso]['title']);
         $content = $smarty->fetch('string:' . $item[$iso]['content']);
         $headers = "Content-type: text/html; charset=utf-8 \r\n";
         $headers .= "From: " . Settings::getValue('admin_email_name', 'connection') . " <" . Settings::getValue('admin_email', 'connection') . ">\r\n";
         mail($to, $title, $content, $headers);
     }
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:22,代码来源:connectionNotification.model.php

示例4: __get

 function __get($name)
 {
     return Load::dependence($name);
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:4,代码来源:Action.class.php

示例5: loadDependences

 static function loadDependences($app_dir)
 {
     $file = String::glue($app_dir, DS, APP_CONFIG_DIR, DS, 'dependence.php');
     if (File::exist($file)) {
         $array = (include $file);
         foreach ($array as $value) {
             Load::dependence($value);
         }
     }
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:10,代码来源:App.class.php

示例6: getView

 public function getView()
 {
     Load::dependence('smarty');
     return Load::dependence('smarty');
 }
开发者ID:Yogurt933,项目名称:Made-Easy,代码行数:5,代码来源:PaymentPlugin.class.php


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