setLogLevel(modX::LOG_LEVEL_ERROR);
setLogLevel(xPDO::LOG_LEVEL_ERROR);
$modx->setLogLevel(modX::LOG_LEVEL_ERROR;
$this->modx->setLogLevel(modX::LOG_LEVEL_DEBUG);
public function __construct(modX &$modx, array &$config)
{
$this->modx =& $modx;
$this->modx->setLogLevel(modX::LOG_LEVEL_DEBUG);
$this->modx->lexicon->load('localweather:default');
// Force all parameters to lowercase
$config = array_change_key_case($config, CASE_LOWER);
// Get MODx Manager settings
$settings = $this->modx->newQuery('modSystemSetting')->where(
array('key:LIKE' => $this->namespace . '%')
);
$settings = $this->modx->getCollection('modSystemSetting', $settings);
// Apply MODx manager settings
foreach($settings as $key => $setting) {
$key = str_replace($this->namespace, '', $key);
// Don't overwrite snippet params
if(empty($config[$key]) OR $config[$key] === NULL)
$config[$key] = $setting->get('value');
}
// Merge snippet parameters and system settings with default config
$this->config = array_merge($this->config, $config);
}public function __construct(modX &$modx, array &$config)
{
$this->modx =& $modx;
$this->modx->setLogLevel(modX::LOG_LEVEL_ERROR);
$this->modx->lexicon->load('localweather:default');
// Force all parameters to lowercase
$config = array_change_key_case($config, CASE_LOWER);
// Get MODx Manager settings
$settings = $this->modx->newQuery('modSystemSetting')->where(
array('key:LIKE' => $this->namespace . '%')
);
$settings = $this->modx->getCollection('modSystemSetting', $settings);
// Apply MODx manager settings
foreach($settings as $key => $setting) {
$key = str_replace($this->namespace, '', $key);
// Don't overwrite snippet params
if(empty($config[$key]) OR $config[$key] === NULL)
$config[$key] = $setting->get('value');
}
// Merge snippet parameters and system settings with default config
$this->config = array_merge($this->config, $config);
}$this->modx =& $modx;
// $this->modx->setLogLevel(modX::LOG_LEVEL_DEBUG);
$this->modx->lexicon->load('localweather:default');$originalDebugLevel = $this->modx->setLogLevel(modX::LOG_LEVEL_DEBUG);
$this->modx->setLogLevel($originalDebugLevel);