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


PHP Url::buildUrlString方法代码示例

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


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

示例1: generate

 public function generate()
 {
     $addUrl = new Url();
     $addUrl->clearPageParams();
     $addUrl->setParam('getfilesystemusage', 1);
     Util::valueToXml('getfilesystemusageurl', $addUrl->buildUrlString(), $this->rootNode);
 }
开发者ID:jramstedt,项目名称:AVM,代码行数:7,代码来源:Statistics.class.php

示例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);
    }
开发者ID:jramstedt,项目名称:AVM,代码行数:46,代码来源:Mainpage.class.php

示例3: addMenuItem

 public function addMenuItem(Url $url, $text)
 {
     $itemNode = $this->doc->createElement('item');
     $this->menuNode->appendChild($itemNode);
     Util::valueToXml('href', $url->buildUrlString(), $itemNode);
     Util::valueToXml('text', $text, $itemNode);
     if ($this->template == $url->getPage()) {
         Util::valueToXml('current', true, $itemNode);
     }
 }
开发者ID:jramstedt,项目名称:AVM,代码行数:10,代码来源:Kernel.class.php

示例4: 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);
 }
开发者ID:jramstedt,项目名称:AVM,代码行数:20,代码来源:Series.class.php

示例5: 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();
     }
 }
开发者ID:jramstedt,项目名称:AVM,代码行数:32,代码来源:Unhandled.class.php

示例6: 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);
 }
开发者ID:jramstedt,项目名称:AVM,代码行数:13,代码来源:Seeking.class.php

示例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());
}
开发者ID:jramstedt,项目名称:AVM,代码行数:31,代码来源:index.php


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