Download the PHP package mwstake/mediawiki-component-contentprovisioner without Composer

On this page you can find all versions of the php package mwstake/mediawiki-component-contentprovisioner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mediawiki-component-contentprovisioner

MediaWiki Stakeholders Group - Components

ContentProvisioner for MediaWiki

Provides a mechanism which allows to import some arbitrary information during "maintenance/update.php".

This code is meant to be executed within the MediaWiki application context. No standalone usage is intended.

Compatibility

Usage in MediaWiki extension

Require this component in the composer.json of your extension:

Explicit initialization is required. This can be achieved by

See also mwstake/mediawiki-componentloader.

Register content to provision

Initially, content provisioner needs "manifest" file to get data to import from. JSON file with such structure is needed:

Here, "old_sha1" key contains hashes for previous content versions. It is needed for cases with already existing wiki pages, to identify if they are just outdated or were added/changed by user.

Such files should be registered in "extension.json" of particular extension that way:

Manifests added to "DefaultContentProvisioner" key will be processed by default content provisioner. That content provisioner just imports corresponding wiki pages which are provided by manifest.

All registered files will be processed during next update with "maintenance/update.php".

Custom content provisioners

Extensions may implement their own import logic within their own content provisioners. To do so, it is needed to have a class, implementing "\MWStake\MediaWiki\Component\ContentProvisioner\IContentProvisioner" interface.

Register custom content provisioner

To be executed during "update.php", custom content provisioner must be registered in such way (ObjectFactory specification):

Here "ArbitraryContentProvisionerKey" is a key, which is used just to identify content provisioner. It is used mostly for logging. "ManifestsKey" is a key which will help to recognize manifests which should be processed by this specific content provisioner.

Register custom content to import

By default, custom manifest file, which will be processed by custom content provisioner, must be registered such way:

Here "ManifestsKey" must be the same value which was passed to that content provisioner as first argument.

Skip content provisioners

If some of content provisioners needs to be disabled, it can be done with $mwsgContentProvisionerSkip global. Let's assume that there is some custom content provisioner which is registered that way:

Then it can be disabled in that way:

If there is a need to disable default content provisioner, it looks similar:


All versions of mediawiki-component-contentprovisioner with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0|~2
mwstake/mediawiki-componentloader Version ~1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mwstake/mediawiki-component-contentprovisioner contains the following files

Loading the files please wait ....