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


PHP Setting::getString方法代码示例

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


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

示例1: init

 /**
  * Initializes the component
  */
 public function init()
 {
     $this->_checker = new Whitelist\Check();
     // Load any stored definitions
     $definitions = Setting::getString('whitelist');
     if (!empty($definitions)) {
         $definitions = $this->parseDefinitions($definitions);
         $this->setDefinitions($definitions);
     }
     parent::init();
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:14,代码来源:Whitelist.php

示例2: init

 /**
  * Initializes the controller. The application name and language is set here.
  */
 public function init()
 {
     // Fallback to XBMC Video Server if the user has removed the
     // application name
     $name = Setting::getString('applicationName');
     if (!$name) {
         $name = 'XBMC Video Server';
     }
     Yii::app()->name = $name;
     Yii::app()->language = Yii::app()->languageManager->getCurrent();
     parent::init();
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:15,代码来源:Controller.php

示例3: init

 /**
  * Initializes the component. The application language is set here. The 
  * language selected is the one the user has specified, if not the 
  * configured application language (which defaults to en).
  */
 public function init()
 {
     $applicationLanguage = Setting::getString('language');
     $sessionLanguage = Yii::app()->session->get(self::SESSION_KEY);
     $userLanguage = $this->getUserLanguage();
     if ($sessionLanguage) {
         $this->_currentLanguage = $sessionLanguage;
     } elseif ($userLanguage) {
         $this->_currentLanguage = $userLanguage;
     } else {
         $this->_currentLanguage = $applicationLanguage;
     }
     parent::init();
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:19,代码来源:LanguageManager.php

示例4: init

 /**
  * Initializes the controller. The application name and language is set here.
  */
 public function init()
 {
     // Use the defined request timeout as execution time limit
     $requestTimeout = Setting::getInteger('requestTimeout');
     set_time_limit($requestTimeout);
     // Fallback to XBMC Video Server if the user has removed the
     // application name
     $name = Setting::getString('applicationName');
     if (!$name) {
         $name = 'XBMC Video Server';
     }
     Yii::app()->name = $name;
     Yii::app()->language = Yii::app()->languageManager->getCurrent();
     parent::init();
 }
开发者ID:Tebro,项目名称:xbmc-video-server,代码行数:18,代码来源:Controller.php

示例5: create

 /**
  * Factory method for creating playlist objects
  * @param string $fileName
  * @param string $format the desired playlist format. Defaults to null, 
  * meaning the configured default format will be used
  * @return Playlist the playlist object
  * @throws InvalidRequestException if the playlist format is not supported
  */
 public static function create($fileName, $format = null)
 {
     if ($format === null) {
         $format = Setting::getString('playlistFormat');
     }
     switch ($format) {
         case Playlist::TYPE_M3U:
             return new M3UPlaylist($fileName);
         case Playlist::TYPE_XSPF:
             return new XSPFPlaylist($fileName);
         case Playlist::TYPE_PLS:
             return new PLSPlaylist($fileName);
         default:
             throw new InvalidRequestException();
     }
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:24,代码来源:PlaylistFactory.php

示例6: renderWatchButton

 /**
  * Renders the "Watch as playlist" button
  */
 private function renderWatchButton()
 {
     // Select the default playlist format by default
     $dropdownOptions = array(Setting::getString('playlistFormat') => array('selected' => 'selected'));
     echo TbHtml::dropDownListControlGroup('playlistFormat', 'playlistFormat', PlaylistFactory::getTypes(), array('label' => Yii::t('Settings', 'Playlist format'), 'options' => $dropdownOptions));
     echo TbHtml::submitButton(Yii::t('RetrieveMediaWidget', 'Watch as playlist'), $this->getWatchButtonsOptions());
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:10,代码来源:RetrieveMediaWidget.php

示例7: array

<?php

$name = Setting::getString('applicationName');
$subtitle = Setting::getString('applicationSubtitle');
?>
<div class="row-fluid">
	<div class="span12 header">
		<?php 
if ($name) {
    ?>
			<h1 id="home-url">
				<a href="<?php 
    echo Yii::app()->homeUrl;
    ?>
">
					<?php 
    echo $name;
    ?>
				</a>
			</h1>
			<?php 
}
if ($subtitle) {
    echo CHtml::tag('p', array('class' => 'lead'), $subtitle);
}
?>
	</div>
</div>
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:28,代码来源:_header.php


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