[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Remote/ -> ApiCore.php (summary)

(no description)

File Size: 1023 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ApiCore:: (31 methods):
  __construct()
  __getRemoteInfo()
  getVersion()
  getTime()
  rawPage()
  getAttachment()
  getAttachmentInfo()
  htmlPage()
  listPages()
  readNamespace()
  search()
  getTitle()
  listAttachments()
  listBackLinks()
  pageInfo()
  putPage()
  appendPage()
  deleteUsers()
  putAttachment()
  deleteAttachment()
  aclCheck()
  listLinks()
  getRecentChanges()
  getRecentMediaChanges()
  pageVersions()
  wikiRpcVersion()
  setLocks()
  getAPIVersion()
  login()
  logoff()
  resolvePageId()


Class: ApiCore  - X-Ref

Provides the core methods for the remote API.
The methods are ordered in 'wiki.<method>' and 'dokuwiki.<method>' namespaces

__construct(Api $api)   X-Ref

param: Api $api

__getRemoteInfo()   X-Ref
Returns details about the core methods

return: array

getVersion()   X-Ref

return: string

getTime()   X-Ref

return: int unix timestamp

rawPage($id, $rev = '')   X-Ref
Return a raw wiki page

param: string $id wiki page id
param: int|string $rev revision timestamp of the page or empty string
return: string page text.

getAttachment($id)   X-Ref
Return a media file

param: string $id file id
return: mixed media file
author: Gina Haeussge <osd@foosel.net>

getAttachmentInfo($id)   X-Ref
Return info about a media file

param: string $id page id
return: array
author: Gina Haeussge <osd@foosel.net>

htmlPage($id, $rev = '')   X-Ref
Return a wiki page rendered to html

param: string $id page id
param: string|int $rev revision timestamp or empty string
return: null|string html

listPages()   X-Ref
List all pages - we use the indexer list here

return: array

readNamespace($ns, $opts)   X-Ref
List all pages in the given namespace (and below)

param: string $ns
param: array $opts
return: array

search($query)   X-Ref
List all pages in the given namespace (and below)

param: string $query
return: array

getTitle()   X-Ref
Returns the wiki title.

return: string

listAttachments($ns, $options = array()   X-Ref
List all media files.

Available options are 'recursive' for also including the subnamespaces
in the listing, and 'pattern' for filtering the returned files against
a regular expression matching their name.

param: string $ns
param: array $options
return: array
author: Gina Haeussge <osd@foosel.net>

listBackLinks($id)   X-Ref
Return a list of backlinks

param: string $id page id
return: array

pageInfo($id, $rev = '')   X-Ref
Return some basic data about a page

param: string $id page id
param: string|int $rev revision timestamp or empty string
return: array

putPage($id, $text, $params)   X-Ref
Save a wiki page

param: string $id page id
param: string $text wiki text
param: array $params parameters: summary, minor edit
return: bool
author: Michael Klier <chi@chimeric.de>

appendPage($id, $text, $params)   X-Ref
Appends text to a wiki page.

param: string $id page id
param: string $text wiki text
param: array $params such as summary,minor
return: bool|string

deleteUsers($usernames)   X-Ref
Remove one or more users from the list of registered users

param: string[] $usernames List of usernames to remove
return: bool

putAttachment($id, $file, $params)   X-Ref
Uploads a file to the wiki.

Michael Klier <chi@chimeric.de>

param: string $id page id
param: string $file
param: array $params such as overwrite
return: false|string

deleteAttachment($id)   X-Ref
Deletes a file from the wiki.

param: string $id page id
return: int
author: Gina Haeussge <osd@foosel.net>

aclCheck($id, $user = null, $groups = null)   X-Ref
Returns the permissions of a given wiki page for the current user or another user

param: string $id page id
param: string|null $user username
param: array|null $groups array of groups
return: int permission level

listLinks($id)   X-Ref
Lists all links contained in a wiki page

param: string $id page id
return: array
author: Michael Klier <chi@chimeric.de>

getRecentChanges($timestamp)   X-Ref
Returns a list of recent changes since give timestamp

param: int $timestamp unix timestamp
return: array
author: Michael Hamann <michael@content-space.de>
author: Michael Klier <chi@chimeric.de>

getRecentMediaChanges($timestamp)   X-Ref
Returns a list of recent media changes since give timestamp

param: int $timestamp unix timestamp
return: array
author: Michael Hamann <michael@content-space.de>
author: Michael Klier <chi@chimeric.de>

pageVersions($id, $first)   X-Ref
Returns a list of available revisions of a given wiki page
Number of returned pages is set by $conf['recent']
However not accessible pages are skipped, so less than $conf['recent'] could be returned

param: string $id page id
param: int $first skip the first n changelog lines
return: array
author: Michael Klier <chi@chimeric.de>

wikiRpcVersion()   X-Ref
The version of Wiki RPC API supported


setLocks($set)   X-Ref
Locks or unlocks a given batch of pages

Give an associative array with two keys: lock and unlock. Both should contain a
list of pages to lock or unlock

Returns an associative array with the keys locked, lockfail, unlocked and
unlockfail, each containing lists of pages.

param: array[] $set list pages with array('lock' => array, 'unlock' => array)
return: array

getAPIVersion()   X-Ref
Return API version

return: int

login($user, $pass)   X-Ref
Login

param: string $user
param: string $pass
return: int

logoff()   X-Ref
Log off

return: int

resolvePageId($id)   X-Ref
Resolve page id

param: string $id page id
return: string