本文整理汇总了PHP中repository::get_option方法的典型用法代码示例。如果您正苦于以下问题:PHP repository::get_option方法的具体用法?PHP repository::get_option怎么用?PHP repository::get_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类repository
的用法示例。
在下文中一共展示了repository::get_option方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_option
/**
* get api_key from config table
* @param string $config
* @return mixed
*/
public function get_option($config = '')
{
if ($config === 'api_key') {
return trim(get_config('flickr_public', 'api_key'));
} else {
$options['api_key'] = trim(get_config('flickr_public', 'api_key'));
}
$options = parent::get_option($config);
return $options;
}
示例2: get_option
/**
* Get dropbox options
* @param string $config
* @return mixed
*/
public function get_option($config = '')
{
if ($config === 'dropbox_key') {
return trim(get_config('dropbox', 'dropbox_key'));
} elseif ($config === 'dropbox_secret') {
return trim(get_config('dropbox', 'dropbox_secret'));
} elseif ($config === 'dropbox_cachelimit') {
return $this->max_cache_bytes();
} else {
$options = parent::get_option();
$options['dropbox_key'] = trim(get_config('dropbox', 'dropbox_key'));
$options['dropbox_secret'] = trim(get_config('dropbox', 'dropbox_secret'));
$options['dropbox_cachelimit'] = $this->max_cache_bytes();
}
return $options;
}
示例3: get_option
/**
* Get dropbox options
* @param string $config
* @return mixed
*/
public function get_option($config = '')
{
if ($config === 'dropbox_key') {
return trim(get_config('dropbox', 'dropbox_key'));
} elseif ($config === 'dropbox_secret') {
return trim(get_config('dropbox', 'dropbox_secret'));
} else {
$options['dropbox_key'] = trim(get_config('dropbox', 'dropbox_key'));
$options['dropbox_secret'] = trim(get_config('dropbox', 'dropbox_secret'));
}
$options = parent::get_option($config);
return $options;
}
示例4: get_option
/**
*
* @param string $config
* @return mixed
*/
public function get_option($config = '')
{
if (preg_match('/^dspace_/', $config)) {
return trim(get_config('dspace', $config));
}
$options = parent::get_option($config);
return $options;
}
示例5: get_option
/**
* Get apikey from config table.
*
* @param string $config
* @return mixed
*/
public function get_option($config = '')
{
if ($config === 'apikey') {
return trim(get_config('youtube', 'apikey'));
} else {
$options['apikey'] = trim(get_config('youtube', 'apikey'));
}
return parent::get_option($config);
}