當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。