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


PHP TPropertyValue::ensureString方法代码示例

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


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

示例1: updateJuiOptions

 /**
  * Updates the options of the jQueryUI widget.
  * @param array list of widget options to change.
  */
 protected function updateJuiOptions($options)
 {
     foreach ($options as $key => $value) {
         $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value));
     }
     $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });";
     $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:12,代码来源:TJuiCallbackPageStateTracker.php

示例2: __construct

 /**
  * Constructor.
  * @param string error message. This can be a string that is listed
  * in the message file. If so, the message in the preferred language
  * will be used as the error message. Any rest parameters will be used
  * to replace placeholders ({0}, {1}, {2}, etc.) in the message.
  */
 public function __construct($errorMessage)
 {
     $this->_errorCode = $errorMessage;
     $errorMessage = $this->translateErrorMessage($errorMessage);
     $args = func_get_args();
     array_shift($args);
     $n = count($args);
     $tokens = array();
     for ($i = 0; $i < $n; ++$i) {
         $tokens['{' . $i . '}'] = TPropertyValue::ensureString($args[$i]);
     }
     parent::__construct(strtr($errorMessage, $tokens));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:20,代码来源:TException.php

示例3: __construct

 /**
  * Constructor, similar to the parent constructor. For parameters that
  * are of SimpleXmlElement, the tag name and its attribute names and values
  * are expanded into a string.
  */
 public function __construct($errorMessage)
 {
     $this->setErrorCode($errorMessage);
     $errorMessage = $this->translateErrorMessage($errorMessage);
     $args = func_get_args();
     array_shift($args);
     $n = count($args);
     $tokens = array();
     for ($i = 0; $i < $n; ++$i) {
         if ($args[$i] instanceof SimpleXMLElement) {
             $tokens['{' . $i . '}'] = $this->implodeNode($args[$i]);
         } else {
             $tokens['{' . $i . '}'] = TPropertyValue::ensureString($args[$i]);
         }
     }
     parent::__construct(strtr($errorMessage, $tokens));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:22,代码来源:TSqlMapException.php

示例4: setCaptchaControl

 /**
  * Sets the ID path of the CAPTCHA control to validate.
  * The ID path is the dot-connected IDs of the controls reaching from
  * the validator's naming container to the target control.
  * @param string the ID path
  */
 public function setCaptchaControl($value)
 {
     $this->setViewState('CaptchaControl', TPropertyValue::ensureString($value), '');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:10,代码来源:TCaptchaValidator.php

示例5: setCacheKey

 /**
  * @param string cache key to be appended to the default calculation scheme
  */
 public function setCacheKey($value)
 {
     $this->_cacheKey = TPropertyValue::ensureString($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TOutputCacheCalculateKeyEventParameter.php

示例6: setCssUrl

 /**
  * @param string URL for the CSS file including all relevant CSS class definitions.
  */
 public function setCssUrl($value)
 {
     $this->setViewState('CssUrl', TPropertyValue::ensureString($value), '');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TTabPanel.php

示例7: setFinishDestinationUrl

 /**
  * @param string the URL that the browser will be redirected to if the wizard finishes.
  */
 public function setFinishDestinationUrl($value)
 {
     $this->setViewState('FinishDestinationUrl', TPropertyValue::ensureString($value), '');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TWizard.php

示例8: setButtonCssClass

 /**
  * @param Sets the css class of the buttons that will be rendered by this pager.
  * @since 3.2.1
  */
 public function setButtonCssClass($value)
 {
     $this->setViewState('ButtonCssClass', TPropertyValue::ensureString($value, ''), '');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TPager.php

示例9: setValue

 /**
  * @param string value of the item
  */
 public function setValue($value)
 {
     $this->_value = TPropertyValue::ensureString($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TListItem.php

示例10: setHandle

 /**
  * Set the handle id or css class
  * @param string
  */
 public function setHandle($value)
 {
     $this->setViewState('DragHandle', TPropertyValue::ensureString($value), null);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TDraggable.php

示例11: setTagName

 /**
  * @param string the tag name of this control.
  */
 public function setTagName($value)
 {
     $this->_tagName = TPropertyValue::ensureString($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:THtmlElement.php

示例12: setHashAlgorithm

 /**
  * @param string hashing algorithm used to generate HMAC.
  */
 public function setHashAlgorithm($value)
 {
     $this->_hashAlgorithm = TPropertyValue::ensureString($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TSecurityManager.php

示例13: formatDataValue

 /**
  * Formats the text value according to a format string.
  * If the format string is empty, the original value is converted into
  * a string and returned.
  * If the format string starts with '#', the string is treated as a PHP expression
  * within which the token '{0}' is translated with the data value to be formated.
  * Otherwise, the format string and the data value are passed
  * as the first and second parameters in {@link sprintf}.
  * @param string format string
  * @param mixed the data to be formatted
  * @return string the formatted result
  */
 protected function formatDataValue($formatString, $value)
 {
     if ($formatString === '') {
         return TPropertyValue::ensureString($value);
     } else {
         if ($formatString[0] === '#') {
             $expression = strtr(substr($formatString, 1), array('{0}' => '$value'));
             try {
                 if (eval("\$result={$expression};") === false) {
                     throw new Exception('');
                 }
                 return $result;
             } catch (Exception $e) {
                 throw new TInvalidDataValueException('listcontrol_expression_invalid', get_class($this), $expression, $e->getMessage());
             }
         } else {
             return sprintf($formatString, $value);
         }
     }
 }
开发者ID:pradosoft,项目名称:prado,代码行数:32,代码来源:TListControl.php

示例14: setCondition

 /**
  * Sets the PHP expression to be evaluated for conditionally displaying content.
  * The context of the expression is the template control containing TConditional.
  * @param string the PHP expression used for determining which template to use.
  */
 public function setCondition($value)
 {
     $this->_condition = TPropertyValue::ensureString($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:9,代码来源:TConditional.php

示例15: setForControl

 /**
  * Sets the ID path of the {@link TTextBox} control.
  * The ID path is the dot-connected IDs of the controls reaching from
  * the keyboard's naming container to the target control.
  * @param string the ID path
  */
 public function setForControl($value)
 {
     $this->setViewState('ForControl', TPropertyValue::ensureString($value));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:10,代码来源:TKeyboard.php


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