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


PHP TPropertyValue::ensureBoolean方法代码示例

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


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

示例1: init

 /**
  * Initialize the TTranslate translation components
  */
 public static function init($catalogue = 'messages')
 {
     static $saveEventHandlerAttached = false;
     //initialized the default class wide formatter
     if (!isset(self::$formatters[$catalogue])) {
         $app = Prado::getApplication()->getGlobalization();
         $config = $app->getTranslationConfiguration();
         $source = MessageSource::factory($config['type'], $config['source'], $config['filename']);
         $source->setCulture($app->getCulture());
         if (isset($config['cache'])) {
             $source->setCache(new MessageCache($config['cache']));
         }
         self::$formatters[$catalogue] = new MessageFormat($source, $app->getCharset());
         //mark untranslated text
         if ($ps = $config['marker']) {
             self::$formatters[$catalogue]->setUntranslatedPS(array($ps, $ps));
         }
         //save the message on end request
         // Do it only once !
         if (!$saveEventHandlerAttached && TPropertyValue::ensureBoolean($config['autosave'])) {
             Prado::getApplication()->attachEventHandler('OnEndRequest', array('Translation', 'saveMessages'));
             $saveEventHandlerAttached = true;
         }
     }
 }
开发者ID:pradosoft,项目名称:prado,代码行数:28,代码来源:Translation.php

示例2: createBooleanControl

 protected function createBooleanControl($container, $column, $record)
 {
     $value = $this->getRecordPropertyValue($column, $record);
     $control = new TCheckBox();
     $control->setChecked(TPropertyValue::ensureBoolean($value));
     $control->setCssClass('boolean-checkbox');
     $this->setDefaultProperty($container, $control, $column, $record);
     return $control;
 }
开发者ID:pradosoft,项目名称:prado,代码行数:9,代码来源:TScaffoldInputCommon.php

示例3: __construct

 public function __construct($dropParams)
 {
     $this->_dragElementId = $dropParams->DragElementID;
     $this->_screenX = $dropParams->ScreenX;
     $this->_screenY = $dropParams->ScreenY;
     $this->_offsetX = isset($dropParams->OffsetX) ? $dropParams->OffsetX : false;
     $this->_offsetY = isset($dropParams->OffsetY) ? $dropParams->OffsetY : false;
     $this->_clientX = $dropParams->ClientX;
     $this->_clientY = $dropParams->ClientY;
     $this->_shiftKey = TPropertyValue::ensureBoolean($dropParams->ShiftKey);
     $this->_ctrlKey = TPropertyValue::ensureBoolean($dropParams->CtrlKey);
     $this->_altKey = TPropertyValue::ensureBoolean($dropParams->AltKey);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:13,代码来源:TDropContainerEventParameter.php

示例4: setContinueBuffering

 /**
  * @param boolean sets whether buffering of output can continue after this point
  */
 public function setContinueBuffering($value)
 {
     $this->_continueBuffering = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TFlushOutput.php

示例5: setCancelNavigation

 /**
  * @param boolean whether navigation to the next step should be canceled.
  */
 public function setCancelNavigation($value)
 {
     $this->_cancel = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TWizardNavigationEventParameter.php

示例6: setPersistent

 /**
  * @param boolean whether the connection is persistent or not
  * Some DBMS (such as sqlite) may not support this feature.
  */
 public function setPersistent($value)
 {
     return $this->setAttribute(PDO::ATTR_PERSISTENT, TPropertyValue::ensureBoolean($value));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TDbConnection.php

示例7: setWrap

 /**
  * Sets the value indicating whether the text content wraps within a multiline text box.
  * @param boolean whether the text content wraps within a multiline text box.
  */
 public function setWrap($value)
 {
     $this->setViewState('Wrap', TPropertyValue::ensureBoolean($value), true);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTextBox.php

示例8: setRecursiveCheck

 /**
  * @param boolean whether the subdirectories of the directory will also be checked.
  */
 public function setRecursiveCheck($value)
 {
     $this->_recursiveCheck = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TDirectoryCacheDependency.php

示例9: setSelected

 /**
  * @param boolean whether the item is selected
  */
 public function setSelected($value)
 {
     $this->_selected = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TListItem.php

示例10: setIsValid

 /**
  * @param bool wether this control is valid.
  */
 public function setIsValid($value)
 {
     $this->_isValid = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TDropDownList.php

示例11: setCachingPostBack

 /**
  * Sets a value indicating whether cached output will be used on postback requests.
  * By default, this is disabled. Be very cautious when enabling it.
  * If the cached content including interactive user controls such as
  * TTextBox, TDropDownList, your page may fail to render on postbacks.
  * @param boolean whether cached output will be used on postback requests.
  */
 public function setCachingPostBack($value)
 {
     $this->_cachePostBack = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:11,代码来源:TOutputCache.php

示例12: setWrap

 /**
  * Sets the value indicating whether the content wraps within the table item.
  * @param boolean whether the content wraps within the panel.
  */
 public function setWrap($value)
 {
     $this->_wrap = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTableItemStyle.php

示例13: setEnableCache

 /**
  * Set true to cache sqlmap instances.
  * @param boolean true to cache sqlmap instance.
  */
 public function setEnableCache($value)
 {
     $this->_enableCache = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TSqlMapConfig.php

示例14: setCausesValidation

 /**
  * @param boolean whether postback event trigger by this button will cause input validation
  */
 public function setCausesValidation($value)
 {
     $this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TImageButton.php

示例15: setCaseSensitive

 /**
  * @param boolean whether the keys are case-sensitive.
  */
 public function setCaseSensitive($value)
 {
     $this->_caseSensitive = TPropertyValue::ensureBoolean($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TAttributeCollection.php


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