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


PHP TPropertyValue::ensureInteger方法代码示例

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


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

示例1: setTotalRowCount

 public function setTotalRowCount($value)
 {
     if (($value = TPropertyValue::ensureInteger($value)) < 0) {
         $value = 0;
     }
     $this->_totalRowCount = $value;
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TDataSourceSelectParameters.php

示例2: setHistorySize

 /**
  * @param integer maximum number of page states that should be kept in session
  * @throws TInvalidDataValueException if the number is smaller than 1.
  */
 public function setHistorySize($value)
 {
     if (($value = TPropertyValue::ensureInteger($value)) > 0) {
         $this->_historySize = $value;
     } else {
         throw new TInvalidDataValueException('sessionpagestatepersister_historysize_invalid');
     }
 }
开发者ID:pradosoft,项目名称:prado,代码行数:12,代码来源:TSessionPageStatePersister.php

示例3: setItemIndex

 /**
  * Sets the zero-based index for the item.
  * If the item is not in the item collection (e.g. it is a header item), -1 should be used.
  * @param integer zero-based index of the item.
  */
 public function setItemIndex($value)
 {
     $this->_itemIndex = TPropertyValue::ensureInteger($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:9,代码来源:TDataListItem.php

示例4: getTimeout

 /**
  * @return integer the number of seconds after which data will be seen as 'garbage' and cleaned up, defaults to 1440 seconds.
  */
 public function getTimeout()
 {
     return TPropertyValue::ensureInteger(ini_get('session.gc_maxlifetime'));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:THttpSession.php

示例5: setMaxSelection

 /**
  * @param integer max number of selections.
  */
 public function setMaxSelection($value)
 {
     if (($value = TPropertyValue::ensureInteger($value)) < 0) {
         $value = -1;
     }
     $this->setViewState('MaxSelection', $value, -1);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:10,代码来源:TListControlValidator.php

示例6: setLineNumber

 /**
  * @param integer the line number at which the template has error
  */
 public function setLineNumber($value)
 {
     $this->_lineNumber = TPropertyValue::ensureInteger($value);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TTemplateException.php

示例7: setRows

 /**
  * Sets the number of rows displayed in a multiline text box.
  * @param integer the number of rows
  */
 public function setRows($value)
 {
     $this->setViewState('Rows', TPropertyValue::ensureInteger($value), self::DEFAULT_ROWS);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTextBox.php

示例8: setVirtualItemCount

 /**
  * @param integer virtual number of data items in the data source.
  * @throws TInvalidDataValueException if the value is less than 0
  * @see setAllowCustomPaging
  */
 public function setVirtualItemCount($value)
 {
     if (($value = TPropertyValue::ensureInteger($value)) < 0) {
         throw new TInvalidDataValueException('databoundcontrol_virtualitemcount_invalid', get_class($this));
     }
     $this->setViewState('VirtualItemCount', $value, 0);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:12,代码来源:TDataBoundControl.php

示例9: setTop

 /**
  * @param integer the Y coordinate of the top side of the rectangle HotSpot region.
  */
 public function setTop($value)
 {
     $this->setViewState('Top', TPropertyValue::ensureInteger($value), 0);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TRectangleHotSpot.php

示例10: setRowSpan

 /**
  * Sets the rowspan for the table cell.
  * @param integer the rowspan for the table cell, 0 if not set.
  */
 public function setRowSpan($value)
 {
     $this->setViewState('RowSpan', TPropertyValue::ensureInteger($value), 0);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTableCell.php

示例11: setTabSize

 /**
  * @param integer tab size
  */
 public function setTabSize($value)
 {
     $this->setViewState('TabSize', TPropertyValue::ensureInteger($value));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TTextHighlighter.php

示例12: bubbleEvent

 /**
  * This method overrides parent's implementation to handle
  * {@link onItemCommand OnItemCommand} event which is bubbled from
  * {@link TDataGridItem} child controls.
  * If the event parameter is {@link TDataGridCommandEventParameter} and
  * the command name is a recognized one, which includes 'select', 'edit',
  * 'delete', 'update', and 'cancel' (case-insensitive), then a
  * corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}).
  * This method should only be used by control developers.
  * @param TControl the sender of the event
  * @param TEventParameter event parameter
  * @return boolean whether the event bubbling should stop here.
  */
 public function bubbleEvent($sender, $param)
 {
     if ($param instanceof TDataGridCommandEventParameter) {
         $this->onItemCommand($param);
         $command = $param->getCommandName();
         if (strcasecmp($command, self::CMD_SELECT) === 0) {
             $this->setSelectedItemIndex($param->getItem()->getItemIndex());
             $this->onSelectedIndexChanged($param);
             return true;
         } else {
             if (strcasecmp($command, self::CMD_EDIT) === 0) {
                 $this->onEditCommand($param);
                 return true;
             } else {
                 if (strcasecmp($command, self::CMD_DELETE) === 0) {
                     $this->onDeleteCommand($param);
                     return true;
                 } else {
                     if (strcasecmp($command, self::CMD_UPDATE) === 0) {
                         $this->onUpdateCommand($param);
                         return true;
                     } else {
                         if (strcasecmp($command, self::CMD_CANCEL) === 0) {
                             $this->onCancelCommand($param);
                             return true;
                         } else {
                             if (strcasecmp($command, self::CMD_SORT) === 0) {
                                 $this->onSortCommand(new TDataGridSortCommandEventParameter($sender, $param));
                                 return true;
                             } else {
                                 if (strcasecmp($command, self::CMD_PAGE) === 0) {
                                     $p = $param->getCommandParameter();
                                     if (strcasecmp($p, self::CMD_PAGE_NEXT) === 0) {
                                         $pageIndex = $this->getCurrentPageIndex() + 1;
                                     } else {
                                         if (strcasecmp($p, self::CMD_PAGE_PREV) === 0) {
                                             $pageIndex = $this->getCurrentPageIndex() - 1;
                                         } else {
                                             if (strcasecmp($p, self::CMD_PAGE_FIRST) === 0) {
                                                 $pageIndex = 0;
                                             } else {
                                                 if (strcasecmp($p, self::CMD_PAGE_LAST) === 0) {
                                                     $pageIndex = $this->getPageCount() - 1;
                                                 } else {
                                                     $pageIndex = TPropertyValue::ensureInteger($p) - 1;
                                                 }
                                             }
                                         }
                                     }
                                     $this->onPageIndexChanged(new TDataGridPageChangedEventParameter($sender, $pageIndex));
                                     return true;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return false;
 }
开发者ID:pradosoft,项目名称:prado,代码行数:74,代码来源:TDataGrid.php

示例13: setRequestTimeOut

 /**
  * @param integer callback request timeout
  */
 public function setRequestTimeOut($value)
 {
     $this->setOption('RequestTimeOut', TPropertyValue::ensureInteger($value));
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TCallbackClientSide.php

示例14: setActiveViewIndex

 /**
  * @param integer the zero-based index of the current view in the view collection. -1 if no active view.
  * @throws TInvalidDataValueException if the view index is invalid
  */
 public function setActiveViewIndex($value)
 {
     $this->setViewState('ActiveViewIndex', TPropertyValue::ensureInteger($value), 0);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:8,代码来源:TTabPanel.php

示例15: setTestLimit

 /**
  * @param integer how many times a generated token can be tested. For unlimited tests, set it to 0.
  */
 public function setTestLimit($value)
 {
     $this->setViewState('TestLimit', TPropertyValue::ensureInteger($value), 5);
 }
开发者ID:pradosoft,项目名称:prado,代码行数:7,代码来源:TCaptcha.php


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