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


PHP Config::Set方法代码示例

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


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

示例1: Init

 /**
  * @return bool
  */
 public function Init()
 {
     if (Config::Get('plugin.beautypo.enable_formatter')) {
         Config::Set('head.rules.beautypo', array('path' => '___path.root.web___/', 'js' => array('include' => array(Plugin::GetTemplateWebPath(__CLASS__) . 'js/markitup-settings.js?'))));
     }
     return true;
 }
开发者ID:KarelWintersky,项目名称:beauTypo-ls,代码行数:10,代码来源:PluginBeautypo.class.php

示例2: _smarty_prefilter_tplhook_mark

function _smarty_prefilter_tplhook_mark($sSource, Smarty_Internal_Template $oTemplate)
{
    $sTemplateFile = ACE::FilePath($oTemplate->smarty->_current_file);
    $nLevel = intval(Config::Get('plugin.aceadminpanel.smarty.options.mark_template_lvl'));
    $sSource = ($nLevel ? "\n\n" : "") . "<!-- TEMPLATE BEGIN ({$nLevel} " . $sTemplateFile . ") -->" . ($nLevel ? "\n" : "") . $sSource . ($nLevel ? "\n" : "") . "<!-- TEMPLATE END ({$nLevel} " . $sTemplateFile . ") -->" . ($nLevel ? "\n" : "");
    Config::Set('plugin.aceadminpanel.smarty.options.mark_template_lvl', ++$nLevel);
    return $sSource;
}
开发者ID:bhoidhos,项目名称:aceAdminPanel,代码行数:8,代码来源:prefilter.tplhook.php

示例3: Init

 /**
  * Инициализация плагина
  */
 public function Init()
 {
     $this->Viewer_AppendScript($this->GetTemplateFilePath(__CLASS__, 'js/comments.js'));
     $this->Viewer_AppendStyle($this->GetTemplateFilePath(__CLASS__, 'css/style.css'));
     if (Config::Get('plugin.editcomment.max_history_depth') < 0) {
         Config::Set('plugin.editcomment.max_history_depth', 0);
     }
 }
开发者ID:lunavod,项目名称:bunker_stable,代码行数:11,代码来源:PluginEditcomment.class.php

示例4: _preInit

 private function _preInit()
 {
     $oUser = $this->_getUser();
     if ($oUser and $oUser->isAdministrator()) {
         Config::Set($this->sPlugin . '.saved.view.skin', Config::Get('view.skin'));
         Config::Set($this->sPlugin . '.saved.path.smarty.template', Config::Get('path.smarty.template'));
         Config::Set($this->sPlugin . '.saved.path.static.skin', Config::Get('path.static.skin'));
         Config::Set('view.skin', 'admin_' . $this->sSkinName);
         Config::Set('path.smarty.template', '___path.root.server___/plugins/aceadminpanel/templates/skin/___view.skin___');
         Config::Set('path.static.skin', '___path.root.web___/plugins/aceadminpanel/templates/skin/___view.skin___');
     }
 }
开发者ID:lifecom,项目名称:Huddlebuddle,代码行数:12,代码来源:HookAdmin.class.php

示例5: _preInit

 protected function _preInit()
 {
     //$oUser = $this->_getUser();
     if ($this->_checkAdmin()) {
         Config::Set($this->sPlugin . '.saved.view.skin', Config::Get('view.skin'));
         Config::Set($this->sPlugin . '.saved.path.smarty.template', Config::Get('path.smarty.template'));
         Config::Set($this->sPlugin . '.saved.path.static.skin', Config::Get('path.static.skin'));
         Config::Set('saved.view.skin', Config::Get('view.skin'));
         Config::Set('saved.path.smarty.template', Config::Get('path.smarty.template'));
         Config::Set('saved.path.static.skin', Config::Get('path.static.skin'));
         Config::Set('view.skin', 'admin_' . $this->sSkinName);
         Config::Set('path.smarty.template', '___path.root.server___/plugins/aceadminpanel/templates/skin/___view.skin___');
         Config::Set('path.static.skin', '___path.root.web___/plugins/aceadminpanel/templates/skin/___view.skin___');
     }
 }
开发者ID:lunavod,项目名称:bunker_stable,代码行数:15,代码来源:HookAdmin.class.php

示例6: testRetrieveAirport

 public function testRetrieveAirport()
 {
     echo '<h3>Core API Tests</h3>';
     echo "<strong>Checking geonames server</strong><br />";
     Config::Set('AIRPORT_LOOKUP_SERVER', 'geonames');
     OperationsData::RemoveAirport('PANC');
     $return = OperationsData::RetrieveAirportInfo('PANC');
     $this->assertNotEqual($return, false);
     echo "<strong>Checking phpVMS API server</strong><br />";
     Config::Set('AIRPORT_LOOKUP_SERVER', 'phpvms');
     Config::Set('PHPVMS_API_SERVER', 'http://apidev.phpvms.net');
     OperationsData::RemoveAirport('PANC');
     $return = OperationsData::RetrieveAirportInfo('PANC');
     $this->assertNotEqual($return, false);
 }
开发者ID:ryanunderwood,项目名称:phpVMS,代码行数:15,代码来源:ops_test.php

示例7: RenderInitDone

 public function RenderInitDone()
 {
     $aMenus = Config::Get('menu.data');
     $bChanged = false;
     if ($aMenus && is_array($aMenus)) {
         foreach ($aMenus as $sMenuId => $aMenu) {
             if (isset($aMenu['init']['fill'])) {
                 $aMenus[$sMenuId] = E::ModuleMenu()->Prepare($sMenuId, $aMenu);
                 $bChanged = true;
             }
         }
         if ($bChanged) {
             Config::Set('menu.data', null);
             Config::Set('menu.data', $aMenus);
         }
     }
 }
开发者ID:ZeoNish,项目名称:altocms,代码行数:17,代码来源:HookMain.class.php

示例8: Init

 /**
  * Инициализация плагина
  *
  * @return void
  */
 public function Init()
 {
     if (preg_match('/^([\\d\\.]+)([^\\d\\.].*)$/', ACEADMINPANEL_VERSION, $m)) {
         $sVersion = $m[1] . '.' . ACEADMINPANEL_VERSION_BUILD . $m[2];
     } else {
         $sVersion = ACEADMINPANEL_VERSION . '.' . ACEADMINPANEL_VERSION_BUILD;
     }
     Config::Set('plugin.aceadminpanel.version', $sVersion);
     //HelperPlugin::InitPlugin($this);
     HelperPlugin::AutoLoadRegister(array($this, 'Autoloader'));
     $sDataFile = $this->PluginAceadminpanel_Admin_GetCustomConfigFile();
     if (!file_exists($sDataFile)) {
         $aConfigSet = $this->PluginAceadminpanel_Admin_GetValueArrayByPrefix('config.all.');
         @file_put_contents($sDataFile, serialize($aConfigSet));
     }
     $this->_loadPluginsConfig();
     $this->_ActionAdminInerits();
 }
开发者ID:lunavod,项目名称:bunker_stable,代码行数:23,代码来源:PluginAceadminpanel.class.php

示例9: Delete

 public static function Delete($Index)
 {
     $Admins = Config::Get('Admins');
     if ($Admins !== false) {
         $Index = intval($Index);
         if (isset($Admins[$Index])) {
             $Admin = $Admins[$Index];
             unset($Admins[$Index]);
             $Saved = Config::Set('Admins', array_values($Admins));
             if ($Saved) {
                 Std::Out("[Info] [Admin] {$Admin[0]}" . (empty($Admin[1]) ? null : ":{$Admin[1]}") . ' deleted');
                 return array($Index, $Admin[0], $Admin[1]);
             } else {
                 Std::Out("[Warning] [Admin] Error while trying to delete {$Admin[0]}" . (empty($Admin[1]) ? null : ":{$Admin[1]}"));
                 return false;
             }
         }
         return 1;
     }
     return false;
 }
开发者ID:RhuanGonzaga,项目名称:WhatsBot,代码行数:21,代码来源:Admin.php

示例10: array

Config::Set('FLIGHT_TYPES', array('P' => 'Passenger', 'C' => 'Cargo', 'H' => 'Charter'));
# Set the types of expenses we have
Config::Set('EXPENSE_TYPES', array('M' => 'Monthly', 'F' => 'Per Flight', 'P' => 'Percent (month)', 'G' => 'Percent (per flight)'));
define('SIGNATURE_PATH', '/lib/signatures');
define('AVATAR_PATH', '/lib/avatars');
define('PIREP_PENDING', 0);
define('PIREP_ACCEPTED', 1);
define('PIREP_REJECTED', 2);
define('PIREP_INPROGRESS', 3);
define('PILOT_PENDING', 0);
define('PILOT_ACCEPTED', 1);
define('PILOT_REJECTED', 2);
define('NAV_NDB', 2);
define('NAV_VOR', 3);
define('NAV_DME', 4);
define('NAV_FIX', 5);
define('NAV_TRACK', 6);
define('LOAD_VARIATION', 5);
define('SECONDS_PER_DAY', 86400);
define('GEONAME_URL', 'http://ws.geonames.org');
define('VMS_AUTH_COOKIE', 'VMSAUTH');
/**
 * Library Includes (from 3rd Party)
 */
# Bit-masks for permission sets
$permission_set = array('EDIT_NEWS' => 0x1, 'EDIT_PAGES' => 0x2, 'EDIT_DOWNLOADS' => 0x4, 'EMAIL_PILOTS' => 0x8, 'EDIT_AIRLINES' => 0x10, 'EDIT_FLEET' => 0x20, 'EDIT_SCHEDULES' => 0x80, 'IMPORT_SCHEDULES' => 0x100, 'MODERATE_REGISTRATIONS' => 0x200, 'EDIT_PILOTS' => 0x400, 'EDIT_GROUPS' => 0x800, 'EDIT_RANKS' => 0x1000, 'EDIT_AWARDS' => 0x2000, 'MODERATE_PIREPS' => 0x4000, 'VIEW_FINANCES' => 0x8000, 'EDIT_EXPENSES' => 0x10000, 'EDIT_SETTINGS' => 0x20000, 'EDIT_PIREPS_FIELDS' => 0x40000, 'EDIT_PROFILE_FIELDS' => 0x80000, 'EDIT_VACENTRAL' => 0x100000, 'ACCESS_ADMIN' => 0x2000000, 'FULL_ADMIN' => 35651519);
Config::Set('permission_set', $permission_set);
define('NO_ADMIN_ACCESS', 0);
foreach ($permission_set as $key => $value) {
    define($key, $value);
}
开发者ID:deanstalker,项目名称:phpVMS,代码行数:31,代码来源:app.config.php

示例11: define

Config::Set('db.table.adminban', '___db.table.prefix___adminban');
Config::Set('db.table.adminips', '___db.table.prefix___adminips');
define('ROUTE_PAGE_ADMIN', 'admin');
//таблицы шаблонов
Config::Set('db.table.templates', '___db.table.prefix___templates');
Config::Set('db.table.tplusers', '___db.table.prefix___tplusers');
Config::Set('db.table.tplfav', '___db.table.prefix___tplfav');
//таблицы виджетов
Config::Set('db.table.widgets', '___db.table.prefix___widgets');
Config::Set('db.table.widusers', '___db.table.prefix___widusers');
Config::Set('db.table.widfav', '___db.table.prefix___widfav');
Config::Set('db.table.widproducers', '___db.table.prefix___widproducers');
//таблицы украшений
Config::Set('db.table.decor', '___db.table.prefix___decor');
Config::Set('db.table.decusers', '___db.table.prefix___decusers');
Config::Set('db.table.decfav', '___db.table.prefix___decfav');
/**
 * Категории шаблонов (текстовые данные редактируются в lang файле плагина админпанели)
 */
$config['tplcats'] = array('nature', 'techno');
/**
 * категории виджетов (текстовые данные редактируются в lang файле плагина админпанели)
 */
$config['widcats'] = array('nature', 'techno');
/**
 * категории украшений (текстовые данные редактируются в lang файле плагина админпанели)
 */
$config['deccats'] = array('nature', 'techno');
/**
 * категории украшений (текстовые данные редактируются в lang файле плагина админпанели)
 */
开发者ID:lifecom,项目名称:test,代码行数:31,代码来源:config.php

示例12: testPIREPRejected

 /**
  * SchedulePIREPTest::testPIREPRejected()
  * 
  * @return void
  */
 public function testPIREPRejected()
 {
     $this->resetPilot();
     $sched = $this->findSchedule();
     Config::Set('PIREP_CHECK_DUPLICATE', false);
     Config::Set('EMAIL_SEND_PIREP', false);
     # Update this schedule to only pay per-hour
     SchedulesData::editScheduleFields($sched->id, array('payforflight' => 0));
     $sched = $this->findSchedule();
     $this->assertEquals(0, $sched->payforflight, 'Pay per-flight set to 0');
     $pirep_test = array('pilotid' => $this->samplePilotID, 'code' => $sched->code, 'flightnum' => $sched->flightnum, 'route' => $sched->route, 'depicao' => $sched->depicao, 'arricao' => $sched->arricao, 'aircraft' => $sched->aircraft, 'flighttime' => $sched->flighttime, 'submitdate' => 'NOW()', 'fuelused' => 6000, 'source' => 'unittest', 'comment' => 'Test Flight');
     # Update Pilot Pay to be set to zero
     PilotData::updateProfile($this->samplePilotID, array('totalpay' => 0));
     $pilot_data = PilotData::getPilotData($this->samplePilotID);
     $this->assertEquals($pilot_data->totalpay, 0, 'Reset Pilot Pay to 0');
     # File the flight report
     $pirepid = PIREPData::fileReport($pirep_test);
     $this->assertGreaterThan(0, $pirepid, PIREPData::$lasterror);
     $pirepdata = PIREPData::findPIREPS(array('p.pirepid' => $pirepid));
     $this->assertGreaterThan(0, count($pirepdata), 'No PIREPs returned');
     # Work on one...
     $pirepdata = $pirepdata[0];
     # Verify the little bits of this PIREP....
     $this->assertEquals(PILOT_PAY_HOURLY, $pirepdata->paytype, 'PIREP Pay Type');
     $this->assertEquals($pilot_data->payrate, $pirepdata->pilotpay, 'PIREP Pay Amount');
     # Check the pilot pay
     $pilot_data = PilotData::getPilotData($this->samplePilotID);
     $this->assertEquals(0, $pilot_data->totalpay, 'Check pilot pay after PIREP FILE');
     # Reject the PIREP and then check the pilot pay
     $status = PIREPData::changePIREPStatus($pirepdata->pirepid, PIREP_REJECTED);
     $pirepdata = PIREPData::findPIREPS(array('p.pirepid' => $pirepid));
     $this->assertEquals(PIREP_REJECTED, $pirepdata[0]->accepted, 'changePIREPStatus to ACCEPTED');
     $pirepdata = $pirepdata[0];
     # Check the schedule flown count:
     $post_accept = $this->findSchedule();
     $this->assertEquals($sched->timesflown, $post_accept->timesflown, "Schedule increment count");
     $post_pilot_data = PilotData::getPilotData($this->samplePilotID);
     $this->assertEquals(0, $post_pilot_data->totalpay, 'Check pilot pay after PIREP REJECT');
     $this->assertEquals($pilot_data->totalflights, $post_pilot_data->totalflights, 'Total Flights');
     # Delete the PIREP
     PIREPData::deletePIREP($pirepid);
     # Verify delete
     $data = PIREPData::findPIREPS(array('p.pirepid' => $pirepid));
     $this->assertEmpty($data, 'PIREPDdata::deletePIREP()');
 }
开发者ID:Galihom,项目名称:phpVMS,代码行数:50,代码来源:SchedulePIREPTest.php

示例13:

<?php

//address router
Config::Set('router.page.mine', 'PluginMystuff_ActionMystuff');
//database setting
$config['table']['topic_commented'] = '___db.table.prefix___topic_commented';
return $config;
开发者ID:lifecom,项目名称:test,代码行数:7,代码来源:config.php

示例14: array

<?php

/**
 * config.php
 * Файл конфига плагина Rating
 *
 * @author      Андрей Воронов <andreyv@gladcode.ru>
 *              Является частью плагина Rating
 * @version     0.0.1 от 30.01.2015 15:30
 */
$config = array('user' => array('vote' => TRUE, 'dislike' => TRUE, 'min_change' => '0.42', 'max_change' => '3.2', 'max_rating' => '500', 'right_border' => '200', 'left_border' => '50', 'left_divider' => '70', 'mid_divider' => '40', 'right_divider' => '2'), 'blog' => array('vote' => TRUE, 'dislike' => TRUE, 'min_change' => '0.130', 'max_change' => '15', 'max_rating' => '500', 'right_border' => '200', 'left_border' => '50', 'left_divider' => '50', 'mid_divider' => '20', 'right_divider' => '10'), 'comment' => array('vote' => TRUE, 'dislike' => TRUE, 'min_change' => '0.004', 'max_change' => '0.5', 'max_rating' => '500', 'right_border' => '200', 'left_border' => '50', 'left_divider' => '130', 'mid_divider' => '70', 'right_divider' => '10'), 'topic' => array('vote' => TRUE, 'min_change' => '0.1', 'max_change' => '8', 'max_rating' => '500', 'right_border' => '200', 'left_border' => '50', 'left_divider' => '100', 'mid_divider' => '70', 'right_divider' => '10', 'auth_coef' => '2.73'), 'rating' => array('vote' => TRUE, 'topic_border_1' => '100', 'topic_border_2' => '250', 'topic_border_3' => '400', 'topic_k1' => '1', 'topic_k2' => '2', 'topic_k3' => '3', 'topic_k4' => '4'));
Config::Set('rating.enabled', true);
return $config;
开发者ID:anp135,项目名称:altocms,代码行数:13,代码来源:config.php

示例15: define

define('LOGS_PATH', CORE_PATH . DS . 'logs');
define('TEMPLATES_PATH', CORE_PATH . DS . 'templates');
define('MODULES_PATH', CORE_PATH . DS . 'modules');
define('CACHE_PATH', CORE_PATH . DS . 'cache');
define('COMMON_PATH', CORE_PATH . DS . 'common');
define('PAGES_PATH', CORE_PATH . DS . 'pages');
define('LIB_PATH', SITE_ROOT . DS . 'lib');
define('VENDORS_PATH', CORE_PATH . DS . 'vendors');
$version = phpversion();
if (intval($version[0]) < 5) {
    die('You are not running PHP 5+');
}
require CLASS_PATH . DS . 'autoload.php';
spl_autoload_register('codon_autoload');
Config::Set('MODULES_PATH', CORE_PATH . DS . 'modules');
Config::Set('MODULES_AUTOLOAD', true);
Template::init();
require CORE_PATH . DS . 'app.config.php';
@(include CORE_PATH . DS . 'local.config.php');
/* Set the language */
Lang::set_language(Config::Get('SITE_LANGUAGE'));
error_reporting(Config::Get('ERROR_LEVEL'));
Debug::$debug_enabled = Config::Get('DEBUG_MODE');
if (Debug::$debug_enabled == true) {
    ini_set('log_errors', 'On');
    ini_set('display_errors', 'Off');
    ini_set('error_log', LOGS_PATH . '/errors.txt');
}
/* Init caching engine */
CodonCache::init($cache_settings);
if (DBASE_NAME != '' && DBASE_SERVER != '' && DBASE_NAME != 'DBASE_NAME') {
开发者ID:Galihom,项目名称:phpVMS,代码行数:31,代码来源:codon.config.php


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