[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> RemoteAPICore.php (summary)

Increased whenever the API is changed

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

Defines 1 class

RemoteAPICore:: (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()
  wiki_RPCVersion()
  setLocks()
  getAPIVersion()
  login()
  logoff()
  resolvePageId()


Class: RemoteAPICore  - X-Ref

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

__construct(RemoteAPI $api)   X-Ref

param: RemoteAPI $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

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

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

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

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.

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

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

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

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.

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

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

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

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

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

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

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

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

author: Michael Klier <chi@chimeric.de>
param: string $id    page id
param: int    $first skip the first n changelog lines (0 = from current(if exists), 1 = from 1st old rev, 2 = from 2nd old rev, etc)
return: array

wiki_RPCVersion()   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