本文整理汇总了PHP中owa_coreAPI::setSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP owa_coreAPI::setSetting方法的具体用法?PHP owa_coreAPI::setSetting怎么用?PHP owa_coreAPI::setSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类owa_coreAPI
的用法示例。
在下文中一共展示了owa_coreAPI::setSetting方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
function action()
{
if ($this->getParam('source')) {
$input_queue_type = $this->getParam('source');
} else {
$input_queue_type = owa_coreAPI::getSetting('base', 'event_queue_type');
}
$processing_queue_type = $this->getParam('destination');
if (!$processing_queue_type) {
$processing_queue_type = owa_coreAPI::getSetting('base', 'event_secondary_queue_type');
}
// switch event queue setting in case a new events should be sent to a different type of queue.
// this is handy for when processing from a file queue to a database queue
if ($processing_queue_type) {
owa_coreAPI::setSetting('base', 'event_queue_type', $processing_queue_type);
owa_coreAPI::debug("Setting event queue type to {$processing_queue_type} for processing.");
}
$d = owa_coreAPI::getEventDispatch();
owa_coreAPI::debug("Loading {$input_queue_type} event queue.");
$q = $d->getAsyncEventQueue($input_queue_type);
$ret = $q->processQueue();
// go ahead and process the secondary event queue
if ($ret && $processing_queue_type) {
$destq = $d->getAsyncEventQueue($processing_queue_type);
$destq->processQueue();
}
}
示例2: __construct
function __construct()
{
$this->name = 'maxmind_geoip';
$this->display_name = 'Maxmind GeoIP';
$this->group = 'geoip';
$this->author = 'Peter Adams';
$this->version = '1.0';
$this->description = 'Performs Maxmind Geo-IP lookups.';
$this->config_required = false;
$this->required_schema_version = 1;
$mode = owa_coreAPI::getSetting('maxmind_geoip', 'lookup_method');
switch ($mode) {
case "geoip_city_isp_org_web_service":
$method = 'getLocationFromWebService';
break;
case "city_lite_db":
$method = 'getLocation';
break;
default:
$method = 'getLocation';
}
$this->method = $method;
// needed so default filters will not fun
owa_coreAPI::setSetting('base', 'geolocation_service', 'maxmind');
return parent::__construct();
}
示例3: action
function action()
{
// define db connection constants using values submitted
if (!defined('OWA_DB_TYPE')) {
define('OWA_DB_TYPE', $this->getParam('db_type'));
}
if (!defined('OWA_DB_HOST')) {
define('OWA_DB_HOST', $this->getParam('db_host'));
}
if (!defined('OWA_DB_NAME')) {
define('OWA_DB_NAME', $this->getParam('db_name'));
}
if (!defined('OWA_DB_USER')) {
define('OWA_DB_USER', $this->getParam('db_user'));
}
if (!defined('OWA_DB_PASSWORD')) {
define('OWA_DB_PASSWORD', $this->getParam('db_password'));
}
owa_coreAPI::setSetting('base', 'db_type', OWA_DB_TYPE);
owa_coreAPI::setSetting('base', 'db_host', OWA_DB_HOST);
owa_coreAPI::setSetting('base', 'db_name', OWA_DB_NAME);
owa_coreAPI::setSetting('base', 'db_user', OWA_DB_USER);
owa_coreAPI::setSetting('base', 'db_password', OWA_DB_PASSWORD);
// Check DB connection status
$db = owa_coreAPI::dbSingleton();
$db->connect();
if ($db->connection_status != true) {
$this->set('error_msg', $this->getMsg(3012));
$this->set('config', $this->params);
$this->setView('base.install');
$this->setSubview('base.installConfigEntry');
} else {
//create config file
$this->c->createConfigFile($this->params);
$this->setRedirectAction('base.installDefaultsEntry');
}
// Check socket connection
// Check permissions on log directory
return;
}
示例4: setSetting
function setSetting($module, $name, $value)
{
return owa_coreAPI::setSetting($module, $name, $value);
}
示例5: setCampaignAdTypeKey
public function setCampaignAdTypeKey($key)
{
$campaign_params = owa_coreAPI::getSetting('base', 'campaign_params');
$campaign_params['ad_type'] = $key;
owa_coreAPI::setSetting('base', 'campaign_params', $campaign_params);
}