Extension:Wikibase DataModel

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Wikibase DataModel

Release status: beta

Description PHP implementation of the Wikibase DataModel
Author(s) Jeroen De Dauw, Wikidata community
Latest version 0.6
MediaWiki 1.21+
PHP 5.3 or above
Database changes no
License GNU GPL v2+

Translate the Wikibase DataModel extension if possible

Check usage and version matrix; code metrics
Bugs: list open list all report

PHP implementation of the Wikibase DataModel.

Requirements[edit | edit source]

Wikibase DataModel requires:

Download[edit | edit source]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extensions tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extensions branches

Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/WikibaseDataModel directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WikibaseDataModel.git

Installation[edit | edit source]

As MediaWiki extension[edit | edit source]

Once you have downloaded the code, place the WikibaseDataModel directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

# Wikibase DataModel
require_once( "$IP/extensions/WikibaseDataModel/WikibaseDataModel.php" );

As standalone library[edit | edit source]

Include WikibaseDataModel/WikibaseDataModel.php. This file includes an autoloader that registers all the classes of the library.

Tests[edit | edit source]

Wikibase DataModel has PHPUnit tests that can be run using the phpunit.xml.dist file in the root directory of the library. Simply run "phpunit" in the root directory or run it from somewhere else specifying the location of the xml file using the "--configuration" option.

Authors[edit | edit source]

Wikibase DataModel has been written by Jeroen De Dauw as Wikimedia Germany employee for the Wikidata project.

See also[edit | edit source]

External links[edit | edit source]