本文整理汇总了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;
}
}
}
示例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;
}
示例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);
}
示例4: setContinueBuffering
/**
* @param boolean sets whether buffering of output can continue after this point
*/
public function setContinueBuffering($value)
{
$this->_continueBuffering = TPropertyValue::ensureBoolean($value);
}
示例5: setCancelNavigation
/**
* @param boolean whether navigation to the next step should be canceled.
*/
public function setCancelNavigation($value)
{
$this->_cancel = TPropertyValue::ensureBoolean($value);
}
示例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));
}
示例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);
}
示例8: setRecursiveCheck
/**
* @param boolean whether the subdirectories of the directory will also be checked.
*/
public function setRecursiveCheck($value)
{
$this->_recursiveCheck = TPropertyValue::ensureBoolean($value);
}
示例9: setSelected
/**
* @param boolean whether the item is selected
*/
public function setSelected($value)
{
$this->_selected = TPropertyValue::ensureBoolean($value);
}
示例10: setIsValid
/**
* @param bool wether this control is valid.
*/
public function setIsValid($value)
{
$this->_isValid = TPropertyValue::ensureBoolean($value);
}
示例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);
}
示例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);
}
示例13: setEnableCache
/**
* Set true to cache sqlmap instances.
* @param boolean true to cache sqlmap instance.
*/
public function setEnableCache($value)
{
$this->_enableCache = TPropertyValue::ensureBoolean($value);
}
示例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);
}
示例15: setCaseSensitive
/**
* @param boolean whether the keys are case-sensitive.
*/
public function setCaseSensitive($value)
{
$this->_caseSensitive = TPropertyValue::ensureBoolean($value);
}