About PHP Class Wrappers

The API calls are wrapped in classes that simplify the PHP code for your individual page. Wrappers let you focus on what you want to do instead of how to format the data for the API to handle. In the constructors shown below, replace the ALL CAPS variables to match your code. Click on the class name to get more detail on that class.

You can find the php include file description here.

WikidotSite Class

This is the parent class that has the basic API methods:

Method Called Using
categories.select php_categories_select
tags.select php_tags_select
posts.select php_posts_select
posts.get php_posts_get
users.get_me php_users_get_me
Create a new site object using this syntax:
$SITEOBJ = new WikidotSite($SITENAME, $CLIENT);
(more information and detailed example)

WikidotMeta Class

This class extends the WkidotSite Class. This class has the following API methods:

Method Called Using
pages.get_meta php_pages_get_meta
Create a new meta object using this syntax:
$METAOBJ = new WikidotMeta($SITENAME, $CLIENT);
(more information and detailed example)

WikidotPage Class

This class extends the WikidotMeta Class. This class has the following API methods:

Method Called Using
pages.select php_pages_select
pages.get_one php_pages_get_one
pages.save_one php_pages_save_one
Create a new page object using this syntax:
$PAGEOBJ = new WikidotPage($SITENAME, $CLIENT);
(more information and detailed example)

FilesWikidotMeta Class

This class extends the WikidotSite Class. This class has the following API methods:

Method Called Using
files.select php_files_select
files.get_meta php_files_get_meta
files.get_one php_files_get_one
files.save_one php_files_save_one
Create a new file object using this syntax:
$FILEOBJ = new FilesWikidotMeta($SITENAME, $CLIENT);
(more information and detailed example)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License