本文整理汇总了PHP中ArrayUtil::toIntegerArray方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::toIntegerArray方法的具体用法?PHP ArrayUtil::toIntegerArray怎么用?PHP ArrayUtil::toIntegerArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::toIntegerArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readParameters
/**
* @see Action::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_POST['applicationIDs'])) {
$this->applicationIDs = ArrayUtil::toIntegerArray($_POST['applicationIDs']);
}
}
示例2: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
if (isset($_POST['username'])) {
$this->username = StringUtil::trim($_POST['username']);
}
if (isset($_POST['email'])) {
$this->email = StringUtil::trim($_POST['email']);
}
if (isset($_POST['confirmEmail'])) {
$this->confirmEmail = StringUtil::trim($_POST['confirmEmail']);
}
if (isset($_POST['password'])) {
$this->password = $_POST['password'];
}
if (isset($_POST['confirmPassword'])) {
$this->confirmPassword = $_POST['confirmPassword'];
}
if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) {
$this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']);
}
if (isset($_POST['visibleLanguages']) && is_array($_POST['visibleLanguages'])) {
$this->visibleLanguages = ArrayUtil::toIntegerArray($_POST['visibleLanguages']);
}
if (isset($_POST['languageID'])) {
$this->languageID = intval($_POST['languageID']);
}
}
示例3: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['boardID'])) {
$this->boardIDArray = ArrayUtil::toIntegerArray(explode(',', $_REQUEST['boardID']));
}
}
示例4: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
if (isset($_POST['unignoredBoardIDArray']) && is_array($_POST['unignoredBoardIDArray'])) {
$this->unignoredBoardIDArray = ArrayUtil::toIntegerArray($_POST['unignoredBoardIDArray']);
}
}
示例5: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['userID'])) {
$this->userID = ArrayUtil::toIntegerArray($_REQUEST['userID']);
}
}
示例6: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
$this->ignoreUniques = $this->plugin = $this->standalone = 0;
if (isset($_POST['packageUpdateServerIDs']) && is_array($_POST['packageUpdateServerIDs'])) {
$this->packageUpdateServerIDs = ArrayUtil::toIntegerArray($_POST['packageUpdateServerIDs']);
}
if (isset($_POST['packageName'])) {
$this->packageName = StringUtil::trim($_POST['packageName']);
}
if (isset($_POST['author'])) {
$this->author = StringUtil::trim($_POST['author']);
}
if (isset($_POST['searchDescription'])) {
$this->searchDescription = intval($_POST['searchDescription']);
}
if (isset($_POST['plugin'])) {
$this->plugin = intval($_POST['plugin']);
}
if (isset($_POST['standalone'])) {
$this->standalone = intval($_POST['standalone']);
}
if (isset($_POST['other'])) {
$this->other = intval($_POST['other']);
}
if (isset($_POST['ignoreUniques'])) {
$this->ignoreUniques = intval($_POST['ignoreUniques']);
}
}
示例7: readParameters
/**
* @see Action::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_POST['sourceListPositions']) && is_array($_POST['sourceListPositions'])) {
$this->positions = ArrayUtil::toIntegerArray($_POST['sourceListPositions']);
}
}
示例8: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
if (isset($_POST['subject'])) {
$this->subject = $_POST['subject'];
}
if (isset($_POST['text'])) {
$this->text = $_POST['text'];
}
if (isset($_POST['enableSmilies'])) {
$this->enableSmilies = $_POST['enableSmilies'];
}
if (isset($_POST['enableHtml'])) {
$this->enableHtml = $_POST['enableHtml'];
}
if (isset($_POST['enableBBCodes'])) {
$this->enableBBCodes = $_POST['enableBBCodes'];
}
if (isset($_POST['showSignature'])) {
$this->showSignature = $_POST['showSignature'];
}
if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) {
$this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']);
}
if (isset($_POST['preview'])) {
$this->preview = (bool) $_POST['preview'];
}
if (isset($_POST['send'])) {
$this->send = (bool) $_POST['send'];
}
if (isset($_POST['maxLifeTime'])) {
$this->maxLifeTime = intval($_POST['maxLifeTime']);
}
}
示例9: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
$this->allTemplates = $this->useRegex = $this->caseSensitive = $this->replace = $this->invertSearch = $this->invertTemplates = 0;
if (isset($_POST['allTemplates'])) {
$this->allTemplates = intval($_POST['allTemplates']);
}
if (isset($_POST['templateID']) && is_array($_POST['templateID'])) {
$this->templateID = ArrayUtil::toIntegerArray($_POST['templateID']);
}
if (isset($_POST['useRegex'])) {
$this->useRegex = intval($_POST['useRegex']);
}
if (isset($_POST['caseSensitive'])) {
$this->caseSensitive = intval($_POST['caseSensitive']);
}
if (isset($_POST['replace'])) {
$this->replace = intval($_POST['replace']);
}
if (isset($_POST['invertSearch'])) {
$this->invertSearch = intval($_POST['invertSearch']);
}
if (isset($_POST['invertTemplates'])) {
$this->invertTemplates = intval($_POST['invertTemplates']);
}
if (isset($_POST['replaceBy'])) {
$this->replaceBy = $_POST['replaceBy'];
}
if (isset($_POST['query'])) {
$this->query = $_POST['query'];
}
}
示例10: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
$this->doSave = isset($_POST[get_class($this)]);
// insert new
if (isset($_POST['optionIDs']) && is_array($_POST['optionIDs'])) {
$this->optionIDs = ArrayUtil::toIntegerArray($_POST['optionIDs']);
}
}
示例11: getData
/**
* @see OptionType::getData()
*/
public function getData($optionData, $newValue)
{
if (!is_array($newValue)) {
$newValue = array();
}
$newValue = ArrayUtil::toIntegerArray($newValue);
sort($newValue, SORT_NUMERIC);
return implode(',', $newValue);
}
示例12: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
if (isset($_POST['userIDs'])) {
$this->userIDs = implode(',', ArrayUtil::toIntegerArray(explode(',', $_POST['userIDs'])));
}
if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) {
$this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']);
}
}
示例13: readParameters
/**
* @see Action::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['groupID'])) {
$this->groupID = intval($_REQUEST['groupID']);
}
if (isset($_POST['groupIDs']) && is_array($_POST['groupIDs'])) {
$this->groupIDs = ArrayUtil::toIntegerArray($_POST['groupIDs']);
}
}
示例14: readFormParameters
/**
* @see Form::readFormParameters()
*/
public function readFormParameters()
{
parent::readFormParameters();
if (isset($_POST['userIDs'])) {
$this->userIDs = ArrayUtil::toIntegerArray(explode(',', $_POST['userIDs']));
}
if (isset($_POST['userID'])) {
$this->userID = intval($_POST['userID']);
}
}
示例15: readParameters
/**
* @see Action::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['templateID']) && is_array($_REQUEST['templateID'])) {
$this->templateID = ArrayUtil::toIntegerArray($_REQUEST['templateID']);
}
if (isset($_REQUEST['templatePackID'])) {
$this->templatePackID = intval($_REQUEST['templatePackID']);
}
}