• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP OM\Registry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: substr

 function __construct($module, $user_id = null, $user_name = null)
 {
     global $PHP_SELF;
     $this->lang = Registry::get('Language');
     $module = HTML::sanitize(str_replace(' ', '', $module));
     if (defined('MODULE_ACTION_RECORDER_INSTALLED') && tep_not_null(MODULE_ACTION_RECORDER_INSTALLED)) {
         if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), explode(';', MODULE_ACTION_RECORDER_INSTALLED))) {
             if (!class_exists($module)) {
                 if (is_file(OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1))) {
                     $this->lang->loadDefinitions('Shop/modules/action_recorder/' . $module);
                     include OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1);
                 } else {
                     return false;
                 }
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
     $this->_module = $module;
     if (!empty($user_id) && is_numeric($user_id)) {
         $this->_user_id = $user_id;
     }
     if (!empty($user_name)) {
         $this->_user_name = $user_name;
     }
     $GLOBALS[$this->_module] = new $module();
     $GLOBALS[$this->_module]->setIdentifier();
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:action_recorder.php


示例2: __construct

 public final function __construct()
 {
     $this->setInfo();
     $this->db = Registry::get('Db');
     $this->lang = Registry::get('Language');
     $this->init();
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:7,代码来源:AppAbstract.php


示例3: record

 function record($success = true)
 {
     $OSCOM_Db = Registry::get('Db');
     if (tep_not_null($this->_module)) {
         $OSCOM_Db->save('action_recorder', ['module' => $this->_module, 'user_id' => (int) $this->_user_id, 'user_name' => $this->_user_name, 'identifier' => $this->getIdentifier(), 'success' => $success == true ? 1 : 0, 'date_added' => 'now()']);
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:7,代码来源:action_recorder.php


示例4: query

 function query($order_id)
 {
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     $Qorder = $OSCOM_Db->get(['orders o', 'orders_status s'], ['o.*', 's.orders_status_name'], ['o.orders_id' => (int) $order_id, 'o.orders_status' => ['rel' => 's.orders_status_id'], 's.language_id' => $OSCOM_Language->getId()]);
     $Qtotals = $OSCOM_Db->get('orders_total', ['title', 'text', 'class'], ['orders_id' => (int) $order_id], 'sort_order');
     while ($Qtotals->fetch()) {
         $this->totals[] = ['title' => $Qtotals->value('title'), 'text' => $Qtotals->value('text'), 'class' => $Qtotals->value('class')];
     }
     $this->info = array('id' => $Qorder->valueInt('orders_id'), 'total' => null, 'currency' => $Qorder->value('currency'), 'currency_value' => $Qorder->value('currency_value'), 'payment_method' => $Qorder->value('payment_method'), 'cc_type' => $Qorder->value('cc_type'), 'cc_owner' => $Qorder->value('cc_owner'), 'cc_number' => $Qorder->value('cc_number'), 'cc_expires' => $Qorder->value('cc_expires'), 'date_purchased' => $Qorder->value('date_purchased'), 'status' => $Qorder->value('orders_status_name'), 'orders_status' => $Qorder->value('orders_status'), 'last_modified' => $Qorder->value('last_modified'));
     foreach ($this->totals as $t) {
         if ($t['class'] == 'ot_total') {
             $this->info['total'] = $t['text'];
             break;
         }
     }
     $this->customer = array('name' => $Qorder->value('customers_name'), 'company' => $Qorder->value('customers_company'), 'street_address' => $Qorder->value('customers_street_address'), 'suburb' => $Qorder->value('customers_suburb'), 'city' => $Qorder->value('customers_city'), 'postcode' => $Qorder->value('customers_postcode'), 'state' => $Qorder->value('customers_state'), 'country' => $Qorder->value('customers_country'), 'format_id' => $Qorder->value('customers_address_format_id'), 'telephone' => $Qorder->value('customers_telephone'), 'email_address' => $Qorder->value('customers_email_address'));
     $this->delivery = array('name' => $Qorder->value('delivery_name'), 'company' => $Qorder->value('delivery_company'), 'street_address' => $Qorder->value('delivery_street_address'), 'suburb' => $Qorder->value('delivery_suburb'), 'city' => $Qorder->value('delivery_city'), 'postcode' => $Qorder->value('delivery_postcode'), 'state' => $Qorder->value('delivery_state'), 'country' => $Qorder->value('delivery_country'), 'format_id' => $Qorder->value('delivery_address_format_id'));
     $this->billing = array('name' => $Qorder->value('billing_name'), 'company' => $Qorder->value('billing_company'), 'street_address' => $Qorder->value('billing_street_address'), 'suburb' => $Qorder->value('billing_suburb'), 'city' => $Qorder->value('billing_city'), 'postcode' => $Qorder->value('billing_postcode'), 'state' => $Qorder->value('billing_state'), 'country' => $Qorder->value('billing_country'), 'format_id' => $Qorder->value('billing_address_format_id'));
     $index = 0;
     $Qproducts = $OSCOM_Db->get('orders_products', ['orders_products_id', 'products_name', 'products_model', 'products_price', 'products_tax', 'products_quantity', 'final_price'], ['orders_id' => (int) $order_id]);
     while ($Qproducts->fetch()) {
         $this->products[$index] = array('qty' => $Qproducts->value('products_quantity'), 'name' => $Qproducts->value('products_name'), 'model' => $Qproducts->value('products_model'), 'tax' => $Qproducts->value('products_tax'), 'price' => $Qproducts->value('products_price'), 'final_price' => $Qproducts->value('final_price'));
         $subindex = 0;
         $Qattributes = $OSCOM_Db->get('orders_products_attributes', ['products_options', 'products_options_values', 'options_values_price', 'price_prefix'], ['orders_id' => (int) $order_id, 'orders_products_id' => $Qproducts->valueInt('orders_products_id')]);
         if ($Qattributes->fetch() !== false) {
             do {
                 $this->products[$index]['attributes'][$subindex] = array('option' => $Qattributes->value('products_options'), 'value' => $Qattributes->value('products_options_values'), 'prefix' => $Qattributes->value('price_prefix'), 'price' => $Qattributes->value('options_values_price'));
                 $subindex++;
             } while ($Qattributes->fetch());
         }
         $index++;
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:34,代码来源:order.php


示例5: execute

 public function execute()
 {
     global $login_customer_id;
     $OSCOM_Db = Registry::get('Db');
     if (is_int($login_customer_id) && $login_customer_id > 0) {
         if (SESSION_RECREATE == 'True') {
             tep_session_recreate();
         }
         $Qcustomer = $OSCOM_Db->prepare('select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from :table_customers c left join :table_address_book ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = :customers_id');
         $Qcustomer->bindInt(':customers_id', $login_customer_id);
         $Qcustomer->execute();
         $_SESSION['customer_id'] = $login_customer_id;
         $_SESSION['customer_default_address_id'] = $Qcustomer->valueInt('customers_default_address_id');
         $_SESSION['customer_first_name'] = $Qcustomer->value('customers_firstname');
         $_SESSION['customer_country_id'] = $Qcustomer->valueInt('entry_country_id');
         $_SESSION['customer_zone_id'] = $Qcustomer->valueInt('entry_zone_id');
         $Qupdate = $OSCOM_Db->prepare('update :table_customers_info set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = :customers_info_id');
         $Qupdate->bindInt(':customers_info_id', $_SESSION['customer_id']);
         $Qupdate->execute();
         // reset session token
         $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
         // restore cart contents
         $_SESSION['cart']->restore_contents();
         if (count($_SESSION['navigation']->snapshot) > 0) {
             $origin_href = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
             $_SESSION['navigation']->clear_snapshot();
             HTTP::redirect($origin_href);
         }
         OSCOM::redirect('index.php');
     }
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:Process.php


示例6: time

 function _sess_gc($maxlifetime)
 {
     $OSCOM_Db = Registry::get('Db');
     $Qdel = $OSCOM_Db->prepare('delete from :table_sessions where expiry < :expiry');
     $Qdel->bindValue(':expiry', time() - $maxlifetime);
     $Qdel->execute();
     return $Qdel->rowCount();
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:8,代码来源:sessions.php


示例7: array

 function __construct()
 {
     $OSCOM_Db = Registry::get('Db');
     $this->currencies = array();
     $Qcurrencies = $OSCOM_Db->query('select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from :table_currencies');
     while ($Qcurrencies->fetch()) {
         $this->currencies[$Qcurrencies->value('code')] = array('title' => $Qcurrencies->value('title'), 'symbol_left' => $Qcurrencies->value('symbol_left'), 'symbol_right' => $Qcurrencies->value('symbol_right'), 'decimal_point' => $Qcurrencies->value('decimal_point'), 'thousands_point' => $Qcurrencies->value('thousands_point'), 'decimal_places' => $Qcurrencies->valueInt('decimal_places'), 'value' => $Qcurrencies->valueDecimal('value'));
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:9,代码来源:currencies.php


示例8: currencies

 function currencies()
 {
     $OSCOM_Db = Registry::get('Db');
     $this->currencies = array();
     $Qcurrencies = $OSCOM_Db->get('currencies', ['code', 'title', 'symbol_left', 'symbol_right', 'decimal_point', 'thousands_point', 'decimal_places', 'value']);
     while ($Qcurrencies->fetch()) {
         $this->currencies[$Qcurrencies->value('code')] = ['title' => $Qcurrencies->value('title'), 'symbol_left' => $Qcurrencies->value('symbol_left'), 'symbol_right' => $Qcurrencies->value('symbol_right'), 'decimal_point' => $Qcurrencies->value('decimal_point'), 'thousands_point' => $Qcurrencies->value('thousands_point'), 'decimal_places' => $Qcurrencies->value('decimal_places'), 'value' => $Qcurrencies->value('value')];
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:9,代码来源:currencies.php


示例9: tep_expire_specials

function tep_expire_specials()
{
    $OSCOM_Db = Registry::get('Db');
    $Qspecials = $OSCOM_Db->query('select specials_id from :table_specials where status = 1 and now() >= expires_date and expires_date > 0');
    if ($Qspecials->fetch() !== false) {
        do {
            tep_set_specials_status($Qspecials->valueInt('specials_id'), 0);
        } while ($Qspecials->fetch());
    }
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:10,代码来源:specials.php


示例10: tep_dt_get_tables

function tep_dt_get_tables()
{
    $OSCOM_Db = Registry::get('Db');
    $result = array();
    $Qtables = $OSCOM_Db->query('show table status');
    while ($Qtables->fetch()) {
        $result[] = $Qtables->value('Name');
    }
    return $result;
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:10,代码来源:database_tables.php


示例11: getBannerGroupSelection

 public static function getBannerGroupSelection($value, $key = '')
 {
     $OSCOM_Db = Registry::get('Db');
     $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value';
     $groups = [['id' => '', 'text' => '--None--']];
     $Qgroups = $OSCOM_Db->query('select distinct banners_group from :table_banners order by banners_group');
     while ($Qgroups->fetch()) {
         $groups[] = ['id' => $Qgroups->value('banners_group'), 'text' => $Qgroups->value('banners_group')];
     }
     return HTML::selectField($name, $groups, $value);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:11,代码来源:cm_footer_banner.php


示例12: language

 function language($lng = '')
 {
     $OSCOM_Db = Registry::get('Db');
     $this->languages = array('af' => 'af|afrikaans', 'ar' => 'ar([-_][[:alpha:]]{2})?|arabic', 'be' => 'be|belarusian', 'bg' => 'bg|bulgarian', 'br' => 'pt[-_]br|brazilian portuguese', 'ca' => 'ca|catalan', 'cs' => 'cs|czech', 'da' => 'da|danish', 'de' => 'de([-_][[:alpha:]]{2})?|german', 'el' => 'el|greek', 'en' => 'en([-_][[:alpha:]]{2})?|english', 'es' => 'es([-_][[:alpha:]]{2})?|spanish', 'et' => 'et|estonian', 'eu' => 'eu|basque', 'fa' => 'fa|farsi', 'fi' => 'fi|finnish', 'fo' => 'fo|faeroese', 'fr' => 'fr([-_][[:alpha:]]{2})?|french', 'ga' => 'ga|irish', 'gl' => 'gl|galician', 'he' => 'he|hebrew', 'hi' => 'hi|hindi', 'hr' => 'hr|croatian', 'hu' => 'hu|hungarian', 'id' => 'id|indonesian', 'it' => 'it|italian', 'ja' => 'ja|japanese', 'ko' => 'ko|korean', 'ka' => 'ka|georgian', 'lt' => 'lt|lithuanian', 'lv' => 'lv|latvian', 'mk' => 'mk|macedonian', 'mt' => 'mt|maltese', 'ms' => 'ms|malaysian', 'nl' => 'nl([-_][[:alpha:]]{2})?|dutch', 'no' => 'no|norwegian', 'pl' => 'pl|polish', 'pt' => 'pt([-_][[:alpha:]]{2})?|portuguese', 'ro' => 'ro|romanian', 'ru' => 'ru|russian', 'sk' => 'sk|slovak', 'sq' => 'sq|albanian', 'sr' => 'sr|serbian', 'sv' => 'sv|swedish', 'sz' => 'sz|sami', 'sx' => 'sx|sutu', 'th' => 'th|thai', 'ts' => 'ts|tsonga', 'tr' => 'tr|turkish', 'tn' => 'tn|tswana', 'uk' => 'uk|ukrainian', 'ur' => 'ur|urdu', 'vi' => 'vi|vietnamese', 'tw' => 'zh[-_]tw|chinese traditional', 'zh' => 'zh|chinese simplified', 'ji' => 'ji|yiddish', 'zu' => 'zu|zulu');
     $this->catalog_languages = array();
     $Qlanguages = $OSCOM_Db->query('select languages_id, name, code, image, directory from :table_languages order by sort_order');
     while ($Qlanguages->fetch()) {
         $this->catalog_languages[$Qlanguages->value('code')] = array('id' => $Qlanguages->valueInt('languages_id'), 'name' => $Qlanguages->value('name'), 'image' => $Qlanguages->value('image'), 'directory' => $Qlanguages->value('directory'));
     }
     $this->browser_languages = '';
     $this->language = '';
     $this->set_language($lng);
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:13,代码来源:language.php


示例13: pass

 function pass()
 {
     $OSCOM_Db = Registry::get('Db');
     $Qcheck = $OSCOM_Db->query('show table status');
     if ($Qcheck->fetch() !== false) {
         do {
             if ($Qcheck->hasValue('Collation') && $Qcheck->value('Collation') != 'utf8_unicode_ci') {
                 return false;
             }
         } while ($Qcheck->fetch());
     }
     return true;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:13,代码来源:mysql_utf8.php


示例14: pass

 function pass()
 {
     global $PHP_SELF;
     $OSCOM_Db = Registry::get('Db');
     if ($PHP_SELF == 'security_checks.php') {
         if (defined('MODULE_SECURITY_CHECK_EXTENDED_LAST_RUN_DATETIME')) {
             $OSCOM_Db->save('configuration', ['configuration_value' => time()], ['configuration_key' => 'MODULE_SECURITY_CHECK_EXTENDED_LAST_RUN_DATETIME']);
         } else {
             $OSCOM_Db->save('configuration', ['configuration_title' => 'Security Check Extended Last Run', 'configuration_key' => 'MODULE_SECURITY_CHECK_EXTENDED_LAST_RUN_DATETIME', 'configuration_value' => time(), 'configuration_description' => 'The date and time the last extended security check was performed.', 'configuration_group_id' => '6', 'date_added' => 'now()']);
         }
         return true;
     }
     return defined('MODULE_SECURITY_CHECK_EXTENDED_LAST_RUN_DATETIME') && MODULE_SECURITY_CHECK_EXTENDED_LAST_RUN_DATETIME > strtotime('-30 days');
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:14,代码来源:extended_last_run.php


示例15: __construct

 public function __construct()
 {
     static $_category_tree_data;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (isset($_category_tree_data)) {
         $this->_data = $_category_tree_data;
     } else {
         $Qcategories = $OSCOM_Db->prepare('select c.categories_id, c.parent_id, c.categories_image, cd.categories_name from :table_categories c, :table_categories_description cd where c.categories_id = cd.categories_id and cd.language_id = :language_id order by c.parent_id, c.sort_order, cd.categories_name');
         $Qcategories->bindInt(':language_id', $OSCOM_Language->getId());
         $Qcategories->setCache('categories-lang' . $OSCOM_Language->getId());
         $Qcategories->execute();
         while ($Qcategories->fetch()) {
             $this->_data[$Qcategories->valueInt('parent_id')][$Qcategories->valueInt('categories_id')] = array('name' => $Qcategories->value('categories_name'), 'image' => $Qcategories->value('categories_image'));
         }
         $_category_tree_data = $this->_data;
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:18,代码来源:category_tree.php


示例16: send

 function send($newsletter_id)
 {
     $OSCOM_Db = Registry::get('Db');
     $newsletterEmail = new Mail();
     $newsletterEmail->setFrom(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER);
     $newsletterEmail->setSubject($this->title);
     if (!empty($this->content)) {
         $newsletterEmail->setBodyPlain($this->content);
     }
     if (!empty($this->content_html)) {
         $newsletterEmail->setBodyHTML($this->content_html);
     }
     $Qmail = $OSCOM_Db->get('customers', ['customers_firstname', 'customers_lastname', 'customers_email_address'], ['customers_newsletter' => '1']);
     while ($Qmail->fetch()) {
         $newsletterEmail->clearTo();
         $newsletterEmail->addTo($Qmail->value('customers_email_address'), $Qmail->value('customers_firstname') . ' ' . $Qmail->value('customers_lastname'));
         $newsletterEmail->send();
     }
     $OSCOM_Db->save('newsletters', ['date_sent' => 'now()', 'status' => '1'], ['newsletters_id' => (int) $newsletter_id]);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:20,代码来源:newsletter.php


示例17: __construct

 public function __construct($code = null)
 {
     $this->db = Registry::get('Db');
     $Qlanguages = $this->db->prepare('select languages_id, name, code, image, directory from :table_languages order by sort_order');
     $Qlanguages->setCache('languages-system');
     $Qlanguages->execute();
     while ($Qlanguages->fetch()) {
         $this->languages[$Qlanguages->value('code')] = ['id' => $Qlanguages->valueInt('languages_id'), 'code' => $Qlanguages->value('code'), 'name' => $Qlanguages->value('name'), 'image' => $Qlanguages->value('image'), 'directory' => $Qlanguages->value('directory')];
     }
     $this->detectors = ['af' => 'af|afrikaans', 'ar' => 'ar([-_][[:alpha:]]{2})?|arabic', 'be' => 'be|belarusian', 'bg' => 'bg|bulgarian', 'br' => 'pt[-_]br|brazilian portuguese', 'ca' => 'ca|catalan', 'cs' => 'cs|czech', 'da' => 'da|danish', 'de' => 'de([-_][[:alpha:]]{2})?|german', 'el' => 'el|greek', 'en' => 'en([-_][[:alpha:]]{2})?|english', 'es' => 'es([-_][[:alpha:]]{2})?|spanish', 'et' => 'et|estonian', 'eu' => 'eu|basque', 'fa' => 'fa|farsi', 'fi' => 'fi|finnish', 'fo' => 'fo|faeroese', 'fr' => 'fr([-_][[:alpha:]]{2})?|french', 'ga' => 'ga|irish', 'gl' => 'gl|galician', 'he' => 'he|hebrew', 'hi' => 'hi|hindi', 'hr' => 'hr|croatian', 'hu' => 'hu|hungarian', 'id' => 'id|indonesian', 'it' => 'it|italian', 'ja' => 'ja|japanese', 'ko' => 'ko|korean', 'ka' => 'ka|georgian', 'lt' => 'lt|lithuanian', 'lv' => 'lv|latvian', 'mk' => 'mk|macedonian', 'mt' => 'mt|maltese', 'ms' => 'ms|malaysian', 'nl' => 'nl([-_][[:alpha:]]{2})?|dutch', 'no' => 'no|norwegian', 'pl' => 'pl|polish', 'pt' => 'pt([-_][[:alpha:]]{2})?|portuguese', 'ro' => 'ro|romanian', 'ru' => 'ru|russian', 'sk' => 'sk|slovak', 'sq' => 'sq|albanian', 'sr' => 'sr|serbian', 'sv' => 'sv|swedish', 'sz' => 'sz|sami', 'sx' => 'sx|sutu', 'th' => 'th|thai', 'ts' => 'ts|tsonga', 'tr' => 'tr|turkish', 'tn' => 'tn|tswana', 'uk' => 'uk|ukrainian', 'ur' => 'ur|urdu', 'vi' => 'vi|vietnamese', 'tw' => 'zh[-_]tw|chinese traditional', 'zh' => 'zh|chinese simplified', 'ji' => 'ji|yiddish', 'zu' => 'zu|zulu'];
     if (!isset($code) || !$this->exists($code)) {
         if (isset($_SESSION['language'])) {
             $code = $_SESSION['language'];
         } else {
             $client = $this->getClientPreference();
             $code = $client !== false ? $client : DEFAULT_LANGUAGE;
         }
     }
     $this->set($code);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:20,代码来源:Language.php


示例18: substr

 function cfg_modules()
 {
     global $PHP_SELF;
     $this->lang = Registry::get('Language');
     $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
     $directory = OSCOM::getConfig('dir_root') . 'includes/modules/cfg_modules';
     if ($dir = @dir($directory)) {
         while ($file = $dir->read()) {
             if (!is_dir($directory . $file)) {
                 if (substr($file, strrpos($file, '.')) == $file_extension) {
                     $class = substr($file, 0, strrpos($file, '.'));
                     $this->lang->loadDefinitions('modules/cfg_modules/' . pathinfo($file, PATHINFO_FILENAME));
                     include OSCOM::getConfig('dir_root') . 'includes/modules/cfg_modules/' . $class . '.php';
                     $m = new $class();
                     $this->_modules[] = array('code' => $m->code, 'directory' => $m->directory, 'language_directory' => $m->language_directory, 'key' => $m->key, 'title' => $m->title, 'template_integration' => $m->template_integration, 'site' => $m->site);
                 }
             }
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:20,代码来源:cfg_modules.php


示例19: output

 function output()
 {
     $output_string = '';
     if (is_array($this->modules)) {
         foreach ($this->modules as $value) {
             if (strpos($value, '\\') !== false) {
                 $OSCOM_OTM = Registry::get('OrderTotal_' . str_replace('\\', '_', $value));
             } else {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $OSCOM_OTM = $GLOBALS[$class];
             }
             if ($OSCOM_OTM->enabled) {
                 $size = sizeof($OSCOM_OTM->output);
                 for ($i = 0; $i < $size; $i++) {
                     $output_string .= '              <tr>' . "\n" . '                <td align="right" class="main">' . $OSCOM_OTM->output[$i]['title'] . '</td>' . "\n" . '                <td align="right" class="main">' . $OSCOM_OTM->output[$i]['text'] . '</td>' . "\n" . '              </tr>';
                 }
             }
         }
     }
     return $output_string;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:21,代码来源:order_total.php


示例20: __construct

 public function __construct()
 {
     register_shutdown_function(function () {
         if (!empty($this->data)) {
             $_SESSION['MessageStack_Data'] = $this->data;
         }
     });
     Registry::get('Hooks')->watch('Session', 'StartAfter', 'execute', function () {
         if (isset($_SESSION['MessageStack_Data']) && !empty($_SESSION['MessageStack_Data'])) {
             foreach ($_SESSION['MessageStack_Data'] as $group => $messages) {
                 foreach ($messages as $message) {
                     $this->add($message['text'], $message['type'], $group);
                 }
             }
             unset($_SESSION['MessageStack_Data']);
         }
     });
     Registry::get('Hooks')->watch('Account', 'LogoutAfter', 'execute', function () {
         $this->reset('main');
     });
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:21,代码来源:MessageStack.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Core\ApplicationAbstract类代码示例发布时间:2022-05-23
下一篇:
PHP OM\OSCOM类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap