當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::CBFramework方法代碼示例

本文整理匯總了PHP中CBLib\Application\Application::CBFramework方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::CBFramework方法的具體用法?PHP Application::CBFramework怎麽用?PHP Application::CBFramework使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CBLib\Application\Application的用法示例。


在下文中一共展示了Application::CBFramework方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param null|string                  $date null: now, string: date or datetime string as UTC, int: unix timestamp
  * @param null|string|int|DateTimeZone $tz   null: server offset, string: timezone string (e.g. UTC), int: offset in hours, DateTimeZone: PHP timezone
  * @param null|string                  $from Format to convert the date from
  * @param Config                       $config
  */
 public function __construct($date = null, $tz = null, $from = null, Config $config)
 {
     $this->config = $config;
     $this->init();
     if (!$date) {
         $date = 'now';
     }
     if (!$tz) {
         $tz = Application::CBFramework()->getCfg('user_timezone');
     }
     $tzCache = date_default_timezone_get();
     date_default_timezone_set('UTC');
     if (is_integer($date)) {
         $this->date = new DateTime();
         $this->date->setTimestamp($date);
     } else {
         if ($date == 'now') {
             $from = null;
         } elseif (is_numeric($date)) {
             $date = date('c', $date);
         }
         if ($from) {
             $this->date = new DateTime();
             $dateArray = date_parse_from_format($from, $date);
             $this->date->setDate($dateArray['year'], $dateArray['month'], $dateArray['day']);
             $this->date->setTime($dateArray['hour'], $dateArray['minute'], $dateArray['second']);
         } else {
             $this->date = new DateTime($date);
         }
     }
     date_default_timezone_set($tzCache);
     $this->setTimezone($tz);
     $this->from = $from;
 }
開發者ID:bobozhangshao,項目名稱:HeartCare,代碼行數:42,代碼來源:Date.php

示例2:

        case 'k':
            $memMax *= 1024;
            break;
    }
    if ($memMax < 48000000) {
        @ini_set('memory_limit', '48M');
    }
}
if (!is_readable(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php')) {
    JFactory::getApplication()->enqueueMessage("Mandatory Community Builder package not installed!", 'error');
    return;
}
/** @noinspection PhpIncludeInspection */
include_once JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
/** @noinspection PhpIncludeInspection */
include_once Application::CBFramework()->getCfg('absolute_path') . '/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.class.php';
jimport('joomla.plugin.plugin');
$app = JFactory::getApplication();
$app->registerEvent('onAfterRoute', 'cbpaidSysPlugin_onAfterStart');
/**
 * CBSubs System Plugin class
 */
class cbpaidSysPlugin
{
    /**
     * Paid subscriptions manager
     * @var cbpaidSubscriptionsMgr
     */
    public $paidsubsManager = null;
    /**
     * Constructor
開發者ID:jasonrgd,項目名稱:Digital-Publishing-Platform-Joomla,代碼行數:31,代碼來源:cbpaidsubscriptions.sysplug.php


注:本文中的CBLib\Application\Application::CBFramework方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。