XML-RPC server class to allow for remote publishing

since 1.0
package bbPress
subpackage Publishing
uses IXR_Server
inherited_from \IXR_Server

 Methods

BB_XMLRPC_Server()

BB_XMLRPC_Server() 

IXR_Server()

IXR_Server($callbacks = false, $data = false, $wait = false
Inherited

Parameters

$callbacks

$data

$wait

Initialises the XML-RPC server

__construct() : void
since 1.0
inherited_from \IXR_Server::__construct()

__construct()

__construct($callbacks = false, $data = false, $wait = false
Inherited

Parameters

$callbacks

$data

$wait

Compiles site options into an array suitable to be passed back through the XML-RPC server

_getOptions(array $options) : array
since 1.0

Parameters

$options

array

An array of options to fetch and return

Returns

arrayThe site options in an array

Adds two numbers together as a demo of XML-RPC

addTwoNumbers(array $args) : integer
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerThe sum of the two supplied numbers

Checks the user credentials supplied in the request to make sure they are valid

authenticate(string $user_login, string $user_pass, string $capability = 'read', string $message = false) : integer | boolean
since 1.0

Parameters

$user_login

string

The users login

$user_pass

string

The users password in plain text

$capability

string

The capability to check (optional)

$message

string

The message to pass back in the error if the capability check fails (optional)

Returns

integerbooleanThe user id if the user is valid, otherwise false

Adds the specified tags to the specified topic

bb_addTopicTags(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe tags which were added when successfully executed or an IXR_Error object on failure

Closes a topic

bb_closeTopic(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject0 when already changed, 1 when successfully changed or an IXR_Error object on failure

Deletes a forum

bb_deleteForum(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject1 when successfully deleted or an IXR_Error object on failure

Deletes an existing post

bb_deletePost(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject1 when successfully deleted, 0 when already deleted or an IXR_Error object on failure

Deletes a topic

bb_deleteTopic(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject0 if already changed, 1 when successfully changed or an IXR_Error object on failure

Destroys the specified tag

bb_destroyTopicTag(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject1 when successfully deleted or an IXR_Error object on failure

Edits an existing forum

bb_editForum(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe forum data when successfully edited or an IXR_Error object on failure

Edits an existing post

bb_editPost(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe post data when successfully edited or an IXR_Error object on failure

Edits an existing topic

bb_editTopic(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe topic data when successfully edited or an IXR_Error object on failure

Returns details of a forum

bb_getForum($args) : array | object
since 1.0

Parameters

$args

Returns

arrayobjectAn array containing details of the returned forum when successfully executed or an IXR_Error object on failure

Returns a numerical count of forums

bb_getForumCount(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe number of forums when successfully executed or an IXR_Error object on failure

Returns details of multiple forums

bb_getForums(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectAn array containing details of all returned forums when successfully executed or an IXR_Error object on failure

Returns the hot tags in order of hotness in a given forum or all hot tags

bb_getHotTopicTags(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe tag data when successfully executed or an IXR_Error object on failure

Gets the specified site options

bb_getOptions(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectAn array containing the specified options when successfully executed or an IXR_Error object on failure

Returns details of a post

bb_getPost(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectAn array containing details of the returned post when successfully executed or an IXR_Error object on failure

Returns a numerical count of posts

bb_getPostCount(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe number of topics when successfully executed or an IXR_Error object on failure

Returns details of the posts in a given topic

bb_getPosts(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe posts when successfully executed or an IXR_Error object on failure

Returns details of a topic

bb_getTopic($args) : array | object
since 1.0

Parameters

$args

Returns

arrayobjectAn array containing details of the returned topic when successfully executed or an IXR_Error object on failure

Returns a numerical count of topics

bb_getTopicCount(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe number of topics when successfully executed or an IXR_Error object on failure

Returns the topics which are tagged with the given tag

bb_getTopicTag(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe topic data when successfully executed or an IXR_Error object on failure

Returns a numerical count of tags in a given topic or all tags

bb_getTopicTagCount(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe number of topics when successfully executed or an IXR_Error object on failure

Returns the tags in a given topic or all tags

bb_getTopicTags(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectThe tag data when successfully executed or an IXR_Error object on failure

Returns details of the latest topics

bb_getTopics(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe topics when successfully executed or an IXR_Error object on failure

Merges the specified tags

bb_mergeTopicTags(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe tag data when successfully merged or an IXR_Error object on failure

Moves a topic to a different forum

bb_moveTopic(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobjectthe forum id where the topic lives after the method is called or an IXR_Error object on failure

Creates a new forum

bb_newForum(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe forum data when successfully created or an IXR_Error object on failure

Creates a new post in a given topic

bb_newPost(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe post data when successfully created or an IXR_Error object on failure

Creates a new topic

bb_newTopic(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe topic data when successfully created or an IXR_Error object on failure

Removes the specified tags from the specified topic

bb_removeTopicTags(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject1 when successfully executed or an IXR_Error object on failure

Renames the specified tag to a new tag name

bb_renameTopicTag(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectThe tag data when successfully renamed or an IXR_Error object on failure

Sets the specified site options to the specified values

bb_setOptions(array $args) : array | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayobjectAn array containing the specified options when successfully executed or an IXR_Error object on failure

Sticks a topic to the top of a forum or the front page

bb_stickTopic(array $args) : integer | object
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

integerobject0 if it is already stuck to the desired location, 1 when successfully stuck or an IXR_Error object on failure

call()

call($methodname, $args) 
Inherited

Parameters

$methodname

$args

error()

error($error, $message = false
Inherited

Parameters

$error

$message

Sanitises data from XML-RPC request parameters

escape($array) : mixed
since 1.0
uses BackPress database class instance

Parameters

$array

mixed The variable to be sanitised

Returns

mixedThe sanitised variable, should come back with the same type

getCapabilities()

getCapabilities($args) 
Inherited

Parameters

$args

hasMethod()

hasMethod($method) 
Inherited

Parameters

$method

Initialises site options which can be manipulated using XML-RPC

initialise_site_option_info() : void
since 1.0

listMethods()

listMethods($args) 
Inherited

Parameters

$args

multiCall()

multiCall($methodcalls) 
Inherited

Parameters

$methodcalls

output()

output($xml) 
Inherited

Parameters

$xml

Returns an array of URLs that pingbacked the given URL

pingback_extensions_getPingbacks(array $args) : array
since 1.0
link http://www.aquarionics.com/misc/archives/blogite/0198.html

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

arrayThe array of URLs that pingbacked the given topic

Processes pingback requests

pingback_ping(array $args) : string | object
since 1.0
link http://www.hixie.ch/specs/pingback/pingback

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

stringobjectA message of success or an IXR_Error object on failure

Prepares forum data for return in an XML-RPC object

prepare_forum(array | object $forum) : array
since 1.0

Parameters

$forum

arrayobject

The unprepared forum data

Returns

arrayThe prepared forum data

Prepares post data for return in an XML-RPC object

prepare_post(array | object $post) : array
since 1.0

Parameters

$post

arrayobject

The unprepared post data

Returns

arrayThe prepared post data

Prepares topic data for return in an XML-RPC object

prepare_topic(array | object $topic) : array
since 1.0

Parameters

$topic

arrayobject

The unprepared topic data

Returns

arrayThe prepared topic data

Prepares topic tag data for return in an XML-RPC object

prepare_topic_tag(array | object $tag) : array
since 1.0

Parameters

$tag

arrayobject

The unprepared topic tag data

Returns

arrayThe prepared topic tag data

Hello world demo function for XML-RPC

sayHello(array $args) : string
since 1.0

Parameters

$args

array

Arguments passed by the XML-RPC call

Returns

stringThe phrase 'Hello!'

serve()

serve($data = false
Inherited

Parameters

$data

setCallbacks()

setCallbacks() 
Inherited

setCapabilities()

setCapabilities() 
Inherited

Switches the currently active user for incognito actions

switch_user(string $user_login, string $capability = 'read', string $message = false) : integer | boolean
since 1.0

Parameters

$user_login

string

The users login

$capability

string

The capability to check (optional)

$message

string

The message to pass back in the error if the capability check fails (optional)

Returns

integerbooleanThe user id if the user is valid, otherwise false

 Properties

 

Whether user switching is allowed

$allow_user_switching : boolean

Default

false
since 1.0
 

Whether read-only methods require authentication

$auth_readonly : boolean

Default

false
since 1.0
 

$callbacks

$callbacks 

Default

array()
 

$capabilities

$capabilities 

Default

 

$data

$data 

Default

 

Stores the last error generated by the class

$error : object | boolean

Default

false
since 1.0
 

$message

$message 

Default

 

Site options which can be manipulated using XML-RPC

$site_options : array

Default

array()
since 1.0