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


PHP loader类代码示例

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


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

示例1: __construct

 function __construct()
 {
     require_once 'functions/loader.php';
     $loader = new loader();
     $config = $loader->load('configuration');
     require_once 'functions/classes/coinbase/Coinbase.php';
     $this->provider = Coinbase::withApiKey($config->api_key(), $config->api_secret());
 }
开发者ID:iamraghavgupta,项目名称:StarterFaucet,代码行数:8,代码来源:coinbaseapi.php

示例2: __construct

 function __construct()
 {
     require_once 'functions/loader.php';
     $loader = new loader();
     $config = $loader->load('configuration');
     $this->key = $config->api_key();
     $this->coin = $config->coin_code();
 }
开发者ID:iamraghavgupta,项目名称:StarterFaucet,代码行数:8,代码来源:coinarea.php

示例3: logIP

 function logIP()
 {
     $time = time();
     require_once 'functions/loader.php';
     $loader = new loader();
     $config = $loader->load('configuration');
     $ip = $_SERVER[$config->ip_forward()];
     $this->saveLog($ip, $time);
 }
开发者ID:girino,项目名称:StarterFaucet,代码行数:9,代码来源:log.php

示例4: __construct

 function __construct()
 {
     require_once 'functions/loader.php';
     $loader = new loader();
     $config = $loader->load('configuration');
     if ($config->debug_mode()) {
         // Show warnings and errors.
         error_reporting(E_ERROR | E_WARNING);
     } else {
         // Hide all errors, warnings, notices, etc from view of public.
         error_reporting(0);
     }
 }
开发者ID:iamraghavgupta,项目名称:StarterFaucet,代码行数:13,代码来源:template.php

示例5: __construct

 function __construct()
 {
     require_once 'functions/loader.php';
     $loader = new loader();
     $config = $loader->load('configuration');
     switch ($config->api_provider()) {
         case 'coinbase':
             $this->provider = $loader->load('coinbaseapi');
             break;
         default:
             echo '<div class="errormsg">The API provided is not valid, please set up a valid API provider in the configuration.</div>';
             $this->provider = new fakeapi();
             break;
     }
 }
开发者ID:iamraghavgupta,项目名称:StarterFaucet,代码行数:15,代码来源:selectapi.php

示例6: invoices

 public function invoices()
 {
     // Get page
     $page = is_numeric(input::get('page')) && input::get('page') > 0 ? input::get('page') : 1;
     // Parameters
     $params = array('join_columns' => array('`t`.`user_id`=' . session::item('user_id')));
     // Process query string
     $qstring = $this->parseQuerystring(config::item('invoices_per_page', 'billing'), session::item('total_transactions'));
     // Get invoices
     $invoices = array();
     if (session::item('total_transactions')) {
         $invoices = $this->transactions_model->getTransactions($params['join_columns'], '', $qstring['limit']);
     } else {
         view::setInfo(__('no_invoices_user', 'billing_transactions'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('billing/invoices?'), 'total_items' => session::item('total_transactions'), 'items_per_page' => config::item('invoices_per_page', 'billing'), 'current_page' => $page, 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('invoices' => $invoices, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('invoices', 'billing_transactions'));
     // Load view
     view::load('billing/invoices');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:25,代码来源:invoices.php

示例7: addScalableButtonCSS

 public function addScalableButtonCSS()
 {
     $basepath = base::baseUrl();
     echo "<style type=\"text/css\"> @import \"{$basepath}/core/styles/btn.php\"; </style>";
     $lib = loader::load("library");
     $lib->jsm->loadButtonJS();
 }
开发者ID:mustafakarali,项目名称:orchidframework,代码行数:7,代码来源:cssm.php

示例8: _createtable

function _createtable($sql)
{
    $db =& loader::database();
    $type = strtoupper(preg_replace("/^\\s*CREATE TABLE\\s+.+\\s+\\(.+?\\).*(ENGINE|TYPE)\\s*=\\s*([a-z]+?).*\$/isU", "\\2", $sql));
    $type = in_array($type, array('MYISAM', 'HEAP', 'MEMORY')) ? $type : 'MYISAM';
    return preg_replace("/^\\s*(CREATE TABLE\\s+.+\\s+\\(.+?\\)).*\$/isU", "\\1", $sql) . ($db->version() > '4.1' ? " ENGINE={$type} DEFAULT CHARSET=utf8" : " TYPE={$type}");
}
开发者ID:vluo,项目名称:myPoto,代码行数:7,代码来源:upgrade.php

示例9: render

 /**
  * render Add Blog dialog
  */
 public function render()
 {
     if ($_REQUEST['akID']) {
         $akID = $_REQUEST['akID'];
         if ($_REQUEST['akID']) {
             if ($_REQUEST['akID'] == 'same_tags') {
                 $key = CollectionAttributeKey::getByHandle('tags');
                 $akID = $key->getAttributeKeyID();
             }
         }
         $html = '<fieldset>';
         $db = loader::db();
         $r = $db->execute("SELECT * FROM atSelectOptions WHERE akID = ?", array($akID));
         while ($row = $r->fetchrow()) {
             $id = $row['ID'];
             $options[$id] = $row['value'];
         }
         if (is_array($options)) {
             foreach ($options as $key => $option) {
                 $html .= '<input type="checkbox" name="fields[]" value="' . $option . '">' . $option . '<br/>';
             }
         }
         $html .= '</fieldset>';
         //print json_encode($options);
         print $html;
         exit;
     }
 }
开发者ID:baardev,项目名称:lbtb,代码行数:31,代码来源:nab_attribute.php

示例10: render

 public function render()
 {
     $id = $this->options['id'];
     $type = $this->options['type'];
     $data = $this->options['data'];
     $style = $this->options['style'];
     $class = $this->options['class'];
     $callback = $this->options['callback'];
     $name = $this->options['name'];
     $theme = $this->options['theme'];
     $refreshinterval = $this->options['refreshinterval'];
     $position = $this->options['position'];
     if ($type == "text" || $type == "html") {
         //process text based widgets
         $output = "<div id='{$id}' class='widget {$class}' style='{$style}'>";
         if (!empty($name)) {
             $output .= "<h2 class='widgettitle'>{$name}</h2>";
         }
         $output .= "<div class='widgetdata'>{$data}</div>";
         $output .= "</div>";
     } else {
         if ($type == "rss") {
             $url = $data;
             $config = loader::load("config");
             $googleApiKey = $config->google_api;
             $output = "\n\t\t\t\t\n\t\t\t\t<div id='{$id}' class='widget {$class}' style='{$style}'>\n\t\t\t\t<h2 class='widgettitle'>{$name}</h2>\n\t\t\t\t<div class='widgetdata'>\n\t\t\t\t<script type=\"text/javascript\" src=\"http://www.google.com/jsapi?key={$googleApiKey}\"></script>\n\t\t\t    <script type=\"text/javascript\">\n\t\t\t\t    \$('#{$id}').gFeed({  \n\t\t\t\t        url: '{$data}', \n\t\t\t\t        title: ''\n\t\t\t\t    });     \n\t\t\t    </script>\n\t\t\t    </div>\n\t\t\t    ";
         }
     }
     return $output;
 }
开发者ID:mustafakarali,项目名称:orchidframework,代码行数:30,代码来源:widgets.php

示例11: manage

 public function manage()
 {
     // Assign user from session to variable
     $user = session::section('session');
     // Get fields
     $fields = array();
     foreach (config::item('usertypes', 'core', 'keywords') as $categoryID => $keyword) {
         $fields[$categoryID] = $this->fields_model->getFields('users', $categoryID, 'view', 'in_list');
     }
     // Parameters
     $params = array('total' => $user['total_blocked'], 'profiles' => true);
     // Process query string
     $qstring = $this->parseQuerystring($params['total']);
     // Get blocked users
     $users = array();
     if ($params['total']) {
         $users = $this->users_blocked_model->getUsers(session::item('user_id'), $qstring['order'], $qstring['limit'], $params);
     } else {
         view::setInfo(__('no_blocked_users', 'users_blocked'));
     }
     // Set pagination
     $config = array('base_url' => config::siteURL('users/blocked/manage?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => config::item('blocked_per_page', 'users'), 'current_page' => $qstring['page'], 'uri_segment' => 'page');
     $pagination = loader::library('pagination', $config, null);
     // Assign vars
     view::assign(array('user' => $user, 'users' => $users, 'fields' => $fields, 'pagination' => $pagination));
     // Set title
     view::setTitle(__('blacklist', 'users'));
     // Load view
     view::load('users/blocked/manage');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:30,代码来源:blocked.php

示例12: sendTemplate

 public function sendTemplate($keyword, $email, $tags = array(), $language = '')
 {
     loader::model('system/emailtemplates');
     if (!$language) {
         $language = config::item('language_id', 'system');
     }
     if (is_numeric($language)) {
         $language = config::item('languages', 'core', 'keywords', $language);
     } elseif (!in_array($language, config::item('languages', 'core', 'keywords'))) {
         return false;
     }
     if (!($template = config::item($keyword . '_' . $language, '_system_emails_cache'))) {
         if (!($template = $this->cache->item('core_email_template_' . $keyword . '_' . $language))) {
             $template = $this->emailtemplates_model->prepareTemplate($keyword, $language);
             if (count($template) == 3) {
                 if ($template[$keyword]['active']) {
                     $template = array('subject' => $template[$keyword]['subject'], 'message_html' => utf8::trim($template['header']['message_html'] . $template[$keyword]['message_html'] . $template['footer']['message_html']), 'message_text' => utf8::trim($template['header']['message_text'] . "\n\n" . $template[$keyword]['message_text'] . "\n\n" . $template['footer']['message_text']));
                 } else {
                     $template = 'none';
                 }
             } else {
                 error::show('Could not fetch email template from the database: ' . $keyword);
             }
             $this->cache->set('core_email_template_' . $keyword . '_' . $language, $template, 60 * 60 * 24 * 30);
         }
         config::set(array($keyword . '_' . $language => $template), '', '_system_emails_cache');
     }
     $retval = true;
     if (is_array($template) && $template) {
         $retval = $this->sendEmail($email, $template['subject'], $template['message_text'], $template['message_html'], $tags);
     }
     return $retval;
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:33,代码来源:email.php

示例13: __construct

 function __construct($base = null)
 {
     if (!$base) {
         $base = loader::get_root() . '../cache/';
     }
     $this->set_root($base);
 }
开发者ID:rustyJ4ck,项目名称:moswarBot,代码行数:7,代码来源:sape_cacher.php

示例14: load

 /**
  * 加载语言文件
  */
 public static function load()
 {
     $agrs = func_get_args();
     for ($i = 0, $n = count($agrs); $i < $n; $i++) {
         ($lang = loader::language($agrs[$i])) && (self::$sfLang = array_merge(self::$sfLang, (array) $lang));
     }
 }
开发者ID:GitBeBest,项目名称:sf-framwork,代码行数:10,代码来源:language.class.php

示例15: fetch

 function fetch($file, $templateid = null, $tpldir = null)
 {
     global $base_path;
     $output =& loader::lib('output');
     $params = $output->getAll();
     extract($params);
     if (!$templateid) {
         $templateid = TEMPLATEID;
     }
     $style_path = $base_path . TPLDIR . '/';
     $setting =& loader::model('setting');
     $theme_config = $setting->get_conf('theme_' . $templateid, array());
     if (isset($_config)) {
         if ($theme_config) {
             $_config = array_merge($_config, $theme_config);
         }
     } else {
         $_config = $theme_config;
     }
     $footer = '<script src="' . $statics_path . 'js/common.js" type="text/javascript"></script>';
     if (isset($loggedin) && $loggedin) {
         $footer .= '<script src="' . $statics_path . 'js/admin.js" type="text/javascript"></script>';
     }
     $footer .= 'Pow' . 'ered by <a href="http://mei' . 'upic.m' . 'eiu.cn/" target="_blank">Mei' . 'uPic ' . MPIC_VERSION . '</a> ';
     $footer .= safe_invert($setting->get_conf('site.footer'), true);
     $show_process_info = $setting->get_conf('system.show_process_info');
     ob_start();
     include $this->template($file, $templateid, $tpldir);
     $content = ob_get_clean();
     return $content;
 }
开发者ID:jorkin,项目名称:meiupic,代码行数:31,代码来源:template.mdl.php


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