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


PHP Wiki::listHandler方法代码示例

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


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

示例1: abusefilters

 /**
  * Returns a list of all filters
  *
  * @access public
  * @param int $start Filter ID to start at. Default null
  * @param int $end Filter ID to end at. Default null
  * @param string $dir Direction to list. Default newer
  * @param bool $enabled Only list enabled filters. true => only enabled, false => only disabled, null => all
  * @param bool $deleted Only list deleted filters. true => only deleted, false => only non-deleted, null => all
  * @param bool $private Only list private filters. true => only private, false => only non-private, null => all
  * @param int $limit Number of filters to get. Default null
  * @param array $prop Properties to retrieve. Default array( 'id', 'description', 'pattern', 'actions', 'hits', 'comments', 'lasteditor', 'lastedittime', 'status', 'private' )
  * @return array
  */
 public function abusefilters($start = null, $end = null, $dir = 'newer', $enabled = null, $deleted = false, $private = null, $limit = null, $prop = array('id', 'description', 'pattern', 'actions', 'hits', 'comments', 'lasteditor', 'lastedittime', 'status', 'private'))
 {
     $tArray = array('prop' => $prop, '_code' => 'abf', 'abfdir' => $dir, '_limit' => $limit, 'abfshow' => array(), 'list' => 'abusefilters');
     if (!is_null($enabled)) {
         if ($enabled) {
             $tArray['abfshow'][] = 'enabled';
         } else {
             $tArray['abfshow'][] = '!enabled';
         }
     }
     if (!is_null($deleted)) {
         if ($deleted) {
             $tArray['abfshow'][] = 'deleted';
         } else {
             $tArray['abfshow'][] = '!deleted';
         }
     }
     if (!is_null($private)) {
         if ($private) {
             $tArray['abfshow'][] = 'private';
         } else {
             $tArray['abfshow'][] = '!private';
         }
     }
     $tArray['abfshow'] = implode('|', $tArray['abfshow']);
     if (!is_null($start)) {
         $tArray['abfstartid'] = $start;
     }
     if (!is_null($end)) {
         $tArray['abfendid'] = $end;
     }
     pecho("Getting abuse filter list...\n\n", PECHO_NORMAL);
     return $this->wiki->listHandler($tArray);
 }
开发者ID:emijrp,项目名称:Peachy,代码行数:48,代码来源:AbuseFilter.php

示例2: embeddedin

 /**
  * Returns array of pages that embed (transclude) the page given.
  *
  * @param array $namespace Which namespaces to search (default: null).
  * @param int $limit How many results to retrieve (default: null i.e. all).
  * @return array A list of pages the title is transcluded in.
  */
 public function embeddedin($namespace = null, $limit = null)
 {
     $eiArray = array('list' => 'embeddedin', '_code' => 'ei', 'eititle' => $this->title, '_lhtitle' => 'title', '_limit' => $limit);
     if (!is_null($namespace)) {
         $eiArray['einamespace'] = $namespace;
     }
     Hooks::runHook('PreQueryEmbeddedin', array(&$eiArray));
     pecho("Getting list of pages that include {$this->title}...\n\n", PECHO_NORMAL);
     return $this->wiki->listHandler($eiArray);
 }
开发者ID:emijrp,项目名称:Peachy,代码行数:17,代码来源:Page.php

示例3: deletedcontribs

 /**
  * List all deleted contributions.
  * The logged in user must have the 'deletedhistory' right
  *
  * @access public
  * @param bool $content Whether or not to return content of each contribution. Default false
  * @param string $start Timestamp to start at. Default null.
  * @param string $end Timestamp to end at. Default null.
  * @param string $dir Direction to list. Default 'older'
  * @param array $prop Information to retrieve. Default array( 'revid', 'user', 'parsedcomment', 'minor', 'len', 'content', 'token' )
  * @return array
  */
 public function deletedcontribs($content = false, $start = null, $end = null, $dir = 'older', $prop = array('revid', 'user', 'parsedcomment', 'minor', 'len', 'content', 'token'))
 {
     if (!in_array('deletedhistory', $this->wiki->get_userrights())) {
         pecho("User is not allowed to view deleted revisions", PECHO_FATAL);
         return false;
     }
     if ($content) {
         $prop[] = 'content';
     }
     $drArray = array('_code' => 'dr', 'list' => 'deletedrevs', 'druser' => $this->username, 'drprop' => implode('|', $prop), 'drdir' => $dir);
     if (!is_null($start)) {
         $drArray['drstart'] = $start;
     }
     if (!is_null($end)) {
         $drArray['drend'] = $end;
     }
     Hooks::runHook('StartDelrevs', array(&$drArray));
     pecho("Getting deleted revisions by {$this->username}...\n\n", PECHO_NORMAL);
     return $this->wiki->listHandler($drArray);
 }
开发者ID:emijrp,项目名称:Peachy,代码行数:32,代码来源:User.php

示例4: get_usage

 /**
  * Returns all pages where the image is used. If function was already called earlier in the script, it will return the local cache unless $force is set to true.
  *
  * @access public
  * @param string|array $namespace Namespaces to look in. If set as a string, must be set in the syntax "0|1|2|...". If an array, simply the namespace IDs to look in. Default null.
  * @param string $redirects How to filter for redirects. Options are "all", "redirects", or "nonredirects". Default "all".
  * @param bool $followRedir If linking page is a redirect, find all pages that link to that redirect as well. Default false.
  * @param int|null $limit
  * @param bool $force Force regeneration of the cache. Default false (use cache).
  * @return array
  */
 public function get_usage($namespace = null, $redirects = "all", $followRedir = false, $limit = null, $force = false)
 {
     if ($force || !count($this->usage)) {
         $iuArray = array('list' => 'imageusage', '_code' => 'iu', '_lhtitle' => 'title', 'iutitle' => $this->title, 'iufilterredir' => $redirects);
         if (!is_null($namespace)) {
             if (is_array($namespace)) {
                 $namespace = implode('|', $namespace);
             }
             $iuArray['iunamespace'] = $namespace;
         }
         if (!is_null($limit)) {
             $iuArray['iulimit'] = $limit;
         }
         if ($followRedir) {
             $iuArray['iuredirect'] = 'yes';
         }
         pecho("Getting image usage for {$this->title}..\n\n", PECHO_NORMAL);
         $this->usage = $this->wiki->listHandler($iuArray);
     }
     return $this->usage;
 }
开发者ID:emijrp,项目名称:Peachy,代码行数:32,代码来源:Image.php


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