本文整理汇总了PHP中Komento::getRegistry方法的典型用法代码示例。如果您正苦于以下问题:PHP Komento::getRegistry方法的具体用法?PHP Komento::getRegistry怎么用?PHP Komento::getRegistry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Komento
的用法示例。
在下文中一共展示了Komento::getRegistry方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->plugin = strtolower( str_replace( 'KomentoHelper', '', get_class( $this ) ) );
$this->pluginpath = JPATH_ROOT . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'komento';
$this->pluginbase = rtrim( JURI::root(), '/' ) . '/plugins/komento';
if( Komento::joomlaVersion() >= '1.6' )
{
$this->pluginpath .= DIRECTORY_SEPARATOR . $this->plugin;
$this->pluginbase .= '/' . $this->plugin;
}
// load plugin language
JFactory::getLanguage()->load( 'plg_komento_' . $this->plugin, JPATH_ROOT );
// load plugin params
$this->params = Komento::getRegistry( JPluginHelper::getPlugin( 'komento', $this->plugin )->params );
}
示例2: getKonfig
public static function getKonfig()
{
static $konfig = null;
if (!$konfig) {
//load default ini data first
$file = KOMENTO_ADMIN_ROOT . DIRECTORY_SEPARATOR . 'konfiguration.json';
$konfig = Komento::getRegistry(JFile::read($file), 'json');
$konfig->default = clone $konfig->toObject();
//get config stored in db
$dbConfig = self::getTable('configs');
$dbConfig->load('com_komento');
$stored = Komento::getRegistry($dbConfig->params, 'json');
$konfig->extend($stored);
}
return $konfig;
}
示例3: saveColumns
function saveColumns()
{
$columns = array('comment', 'published', 'edit', 'component', 'article', 'date', 'author', 'email', 'homepage', 'ip', 'latitude', 'longitude', 'address', 'id');
$message = JText::_('COM_KOMENTO_COMMENTS_COLUMNS_SAVED');
$type = 'message';
$data = JRequest::get('post');
foreach ($data as $key => $value) {
if (!in_array(str_replace('column_', '', $key), $columns)) {
unset($data[$key]);
}
}
$config = Komento::getTable('configs');
$config->load('com_komento_reports_columns');
$config->component = 'com_komento_reports_columns';
$params = $config ? $config->params : '';
$registry = Komento::getRegistry($params, 'json');
$registry->extend($data);
$config->params = $registry->toString('json');
if (!$config->store()) {
$message = $config->getError();
$type = 'error';
}
$this->setRedirect('index.php?option=com_komento&view=reports', $message, $type);
}
示例4: getThemeInfo
public function getThemeInfo( $name )
{
if (empty($this->_themeInfo[$name]))
{
$mainframe = JFactory::getApplication();
$file = '';
// We need to specify if the template override folder also have config.ini file
if ( JFile::exists( JPATH_ROOT . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $mainframe->getTemplate() . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'config.ini' ) )
{
$file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $mainframe->getTemplate() . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'config.ini';
}
// then check the current theme folder
elseif ( JFile::exists( JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento'. DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR . 'config.ini' ) )
{
$file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR . 'config.ini';
}
if( !empty( $file ) )
{
$this->_themeInfo[$name] = Komento::getRegistry( JFile::read( $file ) );
}
else{
$this->_themeInfo[$name] = Komento::getRegistry( '' );
}
}
return $this->_themeInfo[$name];
}