本文整理汇总了PHP中Url::setParam方法的典型用法代码示例。如果您正苦于以下问题:PHP Url::setParam方法的具体用法?PHP Url::setParam怎么用?PHP Url::setParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Url
的用法示例。
在下文中一共展示了Url::setParam方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
public function generate()
{
$addUrl = new Url();
$addUrl->clearPageParams();
$addUrl->setParam('getfilesystemusage', 1);
Util::valueToXml('getfilesystemusageurl', $addUrl->buildUrlString(), $this->rootNode);
}
示例2: generate
public function generate()
{
$filterUrl = new Url();
$filterUrl->clearPageParams();
$filterUrl->setParam('filter', 1);
Util::valueToXml('filterurl', $filterUrl->buildUrlString(), $this->rootNode);
$watchedUrl = new Url();
$watchedUrl->clearPageParams();
$watchedUrl->setParam('watched', 'movie');
Util::valueToXml('watchedmovieurl', $watchedUrl->buildUrlString(), $this->rootNode);
$watchedUrl->clearPageParams();
$watchedUrl->setParam('watched', 'episode');
Util::valueToXml('watchedepisodeurl', $watchedUrl->buildUrlString(), $this->rootNode);
$moviesResult = Kernel::mysqli()->query('SELECT a.* FROM movie a WHERE a.ver IN (SELECT MAX(b.ver) FROM movie b WHERE b.id = a.id) AND watched = 0');
if (is_object($moviesResult)) {
while ($movieObj = $moviesResult->fetch_object()) {
Util::objToXml($movieObj, $this->listNode, 'movie');
}
$moviesResult->close();
}
$episodesResult = Kernel::mysqli()->query('SELECT a.* FROM episode a WHERE a.ver IN (SELECT MAX(b.ver) FROM episode b WHERE b.id = a.id) AND watched = 0');
if (is_object($episodesResult)) {
while ($episodeObj = $episodesResult->fetch_object()) {
Util::objToXml($episodeObj, $this->listNode, 'episode');
}
$episodesResult->close();
}
$this->feedList();
$uncategorized = 0;
$statisticsNode = Util::tagToXml('statistics', $this->rootNode);
$torrentsResult = Kernel::mysqli()->query('SELECT (SELECT COUNT(DISTINCT id) FROM episode WHERE torrent <> "") +
(SELECT COUNT(DISTINCT id) FROM movie WHERE torrent <> "") +
(SELECT COUNT(DISTINCT id) FROM season WHERE torrent <> "") +
(SELECT COUNT(DISTINCT id) FROM serie WHERE torrent <> "")');
$torrentsRow = $torrentsResult->fetch_row();
Util::valueToXml('torrents', $torrentsRow[0], $statisticsNode);
$moviesResult = Kernel::mysqli()->query('SELECT COUNT(DISTINCT id) FROM movie');
$moviesRow = $moviesResult->fetch_row();
Util::valueToXml('movies', $moviesRow[0], $statisticsNode);
$seriesResult = Kernel::mysqli()->query('SELECT COUNT(DISTINCT id) FROM serie');
$seriesRow = $seriesResult->fetch_row();
Util::valueToXml('series', $seriesRow[0], $statisticsNode);
$unhandledResult = Kernel::mysqli()->query("SELECT COUNT(*) FROM unhandled");
$unhandledRow = $unhandledResult->fetch_row();
Util::valueToXml('uncategorized', $unhandledRow[0], $statisticsNode);
}
示例3: generate
public function generate()
{
$addUrl = new Url();
$addUrl->clearPageParams();
$addUrl->setParam('addserie', 1);
Util::valueToXml('addserieurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('addseason', 1);
Util::valueToXml('addseasonurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('addepisode', 1);
Util::valueToXml('addepisodeurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('getseasonlist', 1);
Util::valueToXml('seasonlisturl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('getserielist', 1);
Util::valueToXml('serielisturl', $addUrl->buildUrlString(), $this->rootNode);
$this->serieList(0, 15);
}
示例4: generate
public function generate()
{
$addUrl = new Url();
$addUrl->clearPageParams();
$addUrl->setParam('addmovie', 1);
Util::valueToXml('addmovieurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('addserie', 1);
Util::valueToXml('addserieurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('addseason', 1);
Util::valueToXml('addseasonurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('addepisode', 1);
Util::valueToXml('addepisodeurl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('getserielist', 1);
Util::valueToXml('serielisturl', $addUrl->buildUrlString(), $this->rootNode);
$addUrl->clearPageParams();
$addUrl->setParam('getseasonlist', 1);
Util::valueToXml('seasonlisturl', $addUrl->buildUrlString(), $this->rootNode);
$this->listNode = Util::tagToXml('list', $this->rootNode);
$unhandledResult = Kernel::mysqli()->query('SELECT * FROM unhandled ORDER BY torrent');
if (is_object($unhandledResult)) {
while ($unhandledObj = $unhandledResult->fetch_object()) {
$this->handeTorrent($unhandledObj);
//Util::objToXml($unhandledObj, $listNode, 'torrent');
//Util::objToXml($this->getStuff($unhandledObj), $listNode, 'torrent');
}
$unhandledResult->close();
}
}
示例5: generate
public function generate()
{
$addUrl = new Url();
$addUrl->clearPageParams();
$addUrl->setParam('add', 1);
Util::valueToXml('addurl', $addUrl->buildUrlString(), $this->rootNode);
$countResult = Kernel::mysqli()->query('SELECT COUNT(DISTINCT id) FROM seek');
$countRow = $countResult->fetch_row();
$count = $countRow[0];
$pages = ceil($count / 15);
$page = isset($this->url->getPageParams()->edit) ? $this->url->getPageParams()->page : 0;
$this->seekList($page, 15);
}
示例6: test1
public function test1()
{
// test url manipulation
$url = new Url();
$url->set('http://www.test.com/');
$this->assertEquals($url->getPath(), '/');
$url->setParam('cat', 1);
$this->assertEquals($url->get(), 'http://www.test.com/?cat=1');
$this->assertEquals($url->getPath(), '/?cat=1');
$url->removeParam('cat');
$url->setParam('t', 'kalas');
$url->setParam('f', 'bas');
$this->assertEquals($url->get(), 'http://www.test.com/?t=kalas&f=bas');
$this->assertEquals($url->getPath(), '/?t=kalas&f=bas');
$url = new Url('http://test.com/?param');
$this->assertEquals($url->get(), 'http://test.com/?param');
$this->assertEquals($url->getPath(), '/?param');
$url = new Url('http://test.com/?p=n;hb=HEAD');
$this->assertEquals($url->get(), 'http://test.com/?p=n;hb=HEAD');
$this->assertEquals($url->getPath(), '/?p=n;hb=HEAD');
$url = new Url('http://test.com/?q=minuter+p%E5+skoj');
$this->assertEquals($url->get(), 'http://test.com/?q=minuter+p%E5+skoj');
$this->assertEquals($url->getPath(), '/?q=minuter+p%E5+skoj');
}
示例7: header
} else {
if (empty($page)) {
$page = Mainpage;
} else {
if ($page == Login && Sessionmanager::isLogged()) {
$page = Mainpage;
}
}
}
$errorCode = NULL;
if (class_exists($page)) {
$oPage = new $page();
if ($oPage instanceof IPage && $oPage instanceof Kernel) {
if (Util::isAjaxRequest()) {
$errorCode = $oPage->generateAjax();
// This is the AJAX pipeline.
} else {
$errorCode = $oPage->generate();
// This is the default pipeline.
}
} else {
$errorCode = 501;
}
} else {
$errorCode = 404;
}
if (isset($errorCode)) {
$tmpUrl->setPage('Error');
$tmpUrl->setParam('code', $errorCode);
header('Location: ' . $tmpUrl->buildUrlString());
}