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


PHP TPropertyValue::ensureEnum方法代码示例

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


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

示例1: setPasswordMode

 /**
  * @param TUserManagerPasswordMode how password is stored, clear text, or MD5 or SHA1 hashed.
  */
 public function setPasswordMode($value)
 {
     $this->_passwordMode = TPropertyValue::ensureEnum($value, 'Prado\\Security\\TUserManagerPasswordMode');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TUserManager.php

示例2: setNullConversion

 /**
  * @param TDbNullConversionMode how the null and empty strings are converted
  */
 public function setNullConversion($value)
 {
     switch (TPropertyValue::ensureEnum($value, 'Prado\\Data\\TDbNullConversionMode')) {
         case TDbNullConversionMode::Preserved:
             $value = PDO::NULL_NATURAL;
             break;
         case TDbNullConversionMode::EmptyStringToNull:
             $value = PDO::NULL_EMPTY_STRING;
             break;
         case TDbNullConversionMode::NullToEmptyString:
             $value = PDO::NULL_TO_STRING;
             break;
     }
     $this->setAttribute(PDO::ATTR_ORACLE_NULLS, $value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:18,代码来源:TDbConnection.php

示例3: setConstraint

 /**
  * Set wether the element should be constrainted in one direction
  * @param CDraggableConstraint
  */
 public function setConstraint($value)
 {
     $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\DraggableConstraint'), TDraggableConstraint::None);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TDraggable.php

示例4: select

 /**
  * Client script to select/clear/check a drop down list, check box list,
  * or radio button list.
  * The second parameter determines the selection method. Valid methods are
  *  - <b>Value</b>, select or check by value
  *  - <b>Values</b>, select or check by a list of values
  *  - <b>Index</b>, select or check by index (zero based index)
  *  - <b>Indices</b>, select or check by a list of index (zero based index)
  *  - <b>Clear</b>, clears or selections or checks in the list
  *  - <b>All</b>, select all
  *  - <b>Invert</b>, invert the selection.
  * @param TControl list control
  * @param string selection method
  * @param string|int the value or index to select/check.
  * @param string selection control type, either 'check' or 'select'
  */
 public function select($control, $method = 'Value', $value = null, $type = null)
 {
     $method = TPropertyValue::ensureEnum($method, 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert');
     $type = $type === null ? $this->getSelectionControlType($control) : $type;
     $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1;
     // pass the ID to avoid getting the surrounding elements (ISurroundable)
     if ($control instanceof TControl) {
         $control = $control->getClientID();
     }
     $this->callClientFunction('Prado.Element.select', array($control, $type . $method, $value, $total));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:27,代码来源:TCallbackClientScript.php

示例5: setOperator

 /**
  * Sets the comparison operation to perform
  * @param TValidationCompareOperator the comparison operation
  */
 public function setOperator($value)
 {
     $this->setViewState('Operator', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidationCompareOperator'), TValidationCompareOperator::Equal);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TCompareValidator.php

示例6: setValidation

 /**
  * This method has been deprecated since version 3.2.1.
  * Please use {@link setHashAlgorithm()} instead.
  * @param TSecurityManagerValidationMode hashing algorithm used to generate HMAC.
  */
 public function setValidation($value)
 {
     $this->_hashAlgorithm = TPropertyValue::ensureEnum($value, 'Prado\\Security\\TSecurityManagerValidationMode');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:9,代码来源:TSecurityManager.php

示例7: setTableSection

 /**
  * @param TTableRowSection location of a row in a table.
  */
 public function setTableSection($value)
 {
     $this->setViewState('TableSection', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TTableRowSection'), TTableRowSection::Body);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TTableRow.php

示例8: setDisplay

 /**
  * @param TValidatorDisplayStyle the style of displaying the error message
  */
 public function setDisplay($value)
 {
     $this->setViewState('Display', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidatorDisplayStyle'), TValidatorDisplayStyle::Fixed);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TBaseValidator.php

示例9: setCaptionAlign

 /**
  * @param TTableCaptionAlign table caption alignment.
  */
 public function setCaptionAlign($value)
 {
     $this->setViewState('CaptionAlign', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TTableCaptionAlign'), TTableCaptionAlign::NotSet);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TTable.php

示例10: setScrollBars

 /**
  * @param TScrollBars the visibility and position of scroll bars in a panel control.
  */
 public function setScrollBars($value)
 {
     $this->_scrollBars = TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TScrollBars');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TPanelStyle.php

示例11: setCookieMode

 /**
  * @param THttpSessionCookieMode how to use cookie to store session ID
  * @throws TInvalidOperationException if session is started already
  */
 public function setCookieMode($value)
 {
     if ($this->_started) {
         throw new TInvalidOperationException('httpsession_cookiemode_unchangeable');
     } else {
         $value = TPropertyValue::ensureEnum($value, 'Prado\\Web\\THttpSessionCookieMode');
         if ($value === THttpSessionCookieMode::None) {
             ini_set('session.use_cookies', '0');
             ini_set('session.use_only_cookies', '0');
         } else {
             if ($value === THttpSessionCookieMode::Allow) {
                 ini_set('session.use_cookies', '1');
                 ini_set('session.use_only_cookies', '0');
             } else {
                 ini_set('session.use_cookies', '1');
                 ini_set('session.use_only_cookies', '1');
                 ini_set('session.use_trans_sid', 0);
             }
         }
     }
 }
开发者ID:pradosoft,项目名称:prado,代码行数:25,代码来源:THttpSession.php

示例12: setInvalidFinderResult

 /**
  * Define the way an active record finder react if an invalid magic-finder invoked
  * @param TActiveRecordInvalidFinderResult
  * @since 3.1.5
  * @see getInvalidFinderResult
  */
 public function setInvalidFinderResult($value)
 {
     $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'Prado\\Data\\ActiveRecord\\TActiveRecordInvalidFinderResult');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:10,代码来源:TActiveRecordManager.php

示例13: setGridLines

 /**
  * Sets the grid line style of the table.
  * @param TTableGridLines the grid line setting of the table
  */
 public function setGridLines($value)
 {
     $this->_gridLines = TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TTableGridLines');
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTableStyle.php

示例14: setDisplayMode

 /**
  * @return TBulletedListDisplayMode display mode of the list.
  */
 public function setDisplayMode($value)
 {
     $this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TBulletedListDisplayMode'), TBulletedListDisplayMode::Text);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TBulletedList.php

示例15: setMode

 /**
  * @param TColorPickerMode color picker UI mode
  */
 public function setMode($value)
 {
     $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TColorPickerMode'), TColorPickerMode::Basic);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TColorPicker.php


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