Bridge class

From Apibot

Jump to: navigation, search

Implemented in the file /interfaces/bridge/bridge.php.

It is a big container class that exports access to the Apibot core functionality and properties. Typically used by creating an object of this class.

Contents

Properties

In addition to the Core object, the class also has a shortcut property that points to the Core Info object. These are accessed by the Bridge class methods, and also can be used by the bot scripts.

Methods

Queries

For the Lists and the Generators type of backend-independent Apibot query objects, there is a function that returns a query object of this type.

For the Properties type of backend-independent Apibot query objects, there are four functions that return a query object of this type. One returns the object by params and settings. The other three are convenience functions that allow specifying respectively titles, pageids or revids separatedly from the other params.

For the Meta type of query objects, there is a function that returns a query object of this type.

Tasks

For every backend-independent Apibot task there is a matching method that uses internally the task to do the job.

Extending

As of Apibot 40.0.14, the Bridge class cannot be extended by Apibot extensions. The ability to do that will be added in a future version.

Bridge_Standalone class

A descendant of the Bridge class that as a convenience is constructed from account and settings instead of from a Core object. Creates the needed Core object internally.

Personal tools