本文整理汇总了PHP中AbstractPage::readParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPage::readParameters方法的具体用法?PHP AbstractPage::readParameters怎么用?PHP AbstractPage::readParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractPage
的用法示例。
在下文中一共展示了AbstractPage::readParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
// validate action
switch ($this->action) {
case 'icq':
case 'msn':
case 'aim':
case 'yim':
case 'skype':
case 'jabber':
break;
default:
throw new IllegalLinkException();
}
// set template name
$this->templateName = 'messenger' . ucfirst($this->action);
// user id
if (isset($_REQUEST['userID'])) {
$this->userID = intval($_REQUEST['userID']);
}
$this->user = new UserProfile($this->userID);
if (!$this->user->userID) {
throw new IllegalLinkException();
}
}
示例2: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['cleared'])) {
$this->cleared = intval($_REQUEST['cleared']);
}
}
示例3: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['userID'])) {
$this->userID = ArrayUtil::toIntegerArray($_REQUEST['userID']);
}
}
示例4: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['type'])) {
$this->type = StringUtil::trim($_REQUEST['type']);
}
if (isset($_REQUEST['name'])) {
$this->name = StringUtil::trim($_REQUEST['name']);
}
if (isset($_REQUEST['startInput']) && !empty($_REQUEST['startInput'])) {
$this->start = LWUtil::checkInt($_REQUEST['startInput'], 1);
if ($this->start >= 1 && $this->start <= 99) {
// e.g. 5 => 501; 14 => 1401
$this->start *= 100;
$this->start++;
}
} else {
if (isset($_REQUEST['start'])) {
$this->start = LWUtil::checkInt($_REQUEST['start'], 0);
} else {
if (isset($_REQUEST['relationalID'])) {
$this->relationalID = LWUtil::checkInt($_REQUEST['relationalID']);
}
}
}
if (isset($_REQUEST['rowCount'])) {
$this->rowCount = LWUtil::checkInt($_REQUEST['rowCount'], 10, 500);
}
}
示例5: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['decline'])) {
$this->decline = $_REQUEST['decline'];
}
}
示例6: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (!MODULE_ABOUT_LISTING) {
throw new IllegalLinkException();
}
}
示例7: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['q'])) {
$this->input = StringUtil::trim($_REQUEST['q']);
}
}
示例8: readParameters
/**
* @see Page::readParameters
*/
public function readParameters()
{
global $resource;
parent::readParameters();
// maxships
/*foreach($_POST as $key => $row) {
if(strstr($key, 'maxShip')) {
unset($_POST[$key]);
$key = substr($key, 7, 3);
$maxShips[$key] = intval($row);
}
}*/
// ships
foreach ($_POST as $key => $row) {
if (strstr($key, 'ship')) {
$key = substr($key, 4, 3);
if (intval($row) == 0) {
continue;
}
if ($row > LWCore::getPlanet()->{$resource[$key]}) {
$ships[$key] = LWCore::getPlanet()->{$resource[$key]};
} else {
$ships[$key] = intval($row);
}
}
}
$this->fleet = $ships;
$this->checkQueue();
}
示例9: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['activePackageID'])) {
$this->packageID = intval($_REQUEST['activePackageID']);
}
}
示例10: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
// load cache
$cache = WCF::getCache()->get('help-' . PACKAGE_ID);
$this->items = $cache['items'];
$this->helpStructure = $cache['structure'];
unset($cache);
// check item options and permissions
$this->checkOptions();
$this->checkPermissions();
// check active item
if (isset($_REQUEST['item'])) {
$this->parentHelpItem = $_REQUEST['item'];
if (!isset($this->items[$this->parentHelpItem])) {
throw new IllegalLinkException();
}
} else {
// get parent by referer
if (WCF::getSession()->lastRequestURI) {
foreach ($this->items as $item) {
if ($item->refererPattern) {
if (preg_match('~' . $item->refererPattern . '~i', WCF::getSession()->lastRequestURI)) {
$this->parentHelpItem = $item->helpItem;
}
}
}
}
}
}
示例11: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (!empty($_POST['action']) && $_POST['action'] == 'compare') {
if (!empty($_POST['version1']) && !empty($_POST['version2'])) {
require_once WCF_DIR . 'lib/acp/package/Package.class.php';
$this->verResult = Package::compareVersion($_POST['version1'], $_POST['version2']);
// $this->verResult = version_compare($_POST['version1'], $_POST['version2']);
$this->verFirst = $_POST['version1'];
$this->verSecond = $_POST['version2'];
if ($this->logFile) {
$entries = array();
$u = WCF::getUser()->username ? WCF::getUser()->username : 'Guest';
$t = TIME_NOW;
if (is_file(WBB_DIR . '/' . $this->logFile)) {
$entries = file(WBB_DIR . '/' . $this->logFile);
}
array_push($entries, $t . '||' . date('d.m.Y H:i:s', $t) . '||' . $u . '||' . $this->verFirst . '||' . $this->verSecond);
rsort($entries);
if (!empty($this->logMaxEntries) && $this->logMaxEntries > 0) {
$output = array_slice($entries, 0, $this->logMaxEntries);
} else {
$output = $entries;
}
if (count($output) && ($fh = @fopen(WBB_DIR . '/' . $this->logFile, 'w'))) {
foreach ($output as $k => $line) {
fwrite($fh, trim($line) . "\n");
}
fclose($fh);
}
}
}
}
}
示例12: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_GET['allianceID'])) {
$this->allianceID = intval($_GET['allianceID']);
}
}
示例13: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['detailedFleetID'])) {
$this->detailedFleetID = intval($_REQUEST['detailedFleetID']);
}
}
示例14: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['deletedItemID'])) {
$this->deletedItemID = intval($_REQUEST['deletedItemID']);
}
}
示例15: readParameters
/**
* @see Page::readParameters()
*/
public function readParameters()
{
parent::readParameters();
if (isset($_REQUEST['userID'])) {
$this->userID = intval($_REQUEST['userID']);
}
}