Download the PHP package open-csp/w-s-slots without Composer

On this page you can find all versions of the php package open-csp/w-s-slots. 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 w-s-slots

WSSlots

This extension provides a mechanism to create new slots.

Installation

Configuration

The extension provides the following configuration options:

$wgWSSlotsDefinedSlots

This is an array of the slots to define. Each item in the array corresponds to the name of the slot to define. It is also possible to optionally configure the slot's content model and slot role layout, like so:

This configuration variable is also exposed as a JavaScript variable and can be accessed like so:

Please note that this only covers slots created by the WSSlots extension.

For more information on content models see MediaWiki.org and for more information on slot role layouts see here.

$wgWSSlotsDefaultContentModel

This is the default content model to use, if no content model is given explicitly.

$wgWSSlotsDefaultSlotRoleLayout

This is the default slot role layout to use, if no slot role layout is given explicitly.

$wgWSSlotsSemanticSlots

This configuration parameter defines which slots should be analysed for semantic annotations.

$wgWSSlotsDoPurge

This configuration option specifies whether to purge the page after a slot edit is performed.

$wgWSSlotsOverrideActions

When set to true, all actions are replaced by slot-aware actions when available. When set to an array, each item in the array specifies an action to replace with its slot aware counterpart. See #Actions below for a list of available slot-aware actions.

Parser functions

#slot

The extension provides the #slot parser function to get the content of a specific slot. For example, {{#slot: main}} returns the content of the main slot. You can optionally specify a page as the second parameter. For instance, {{#slot: main | Foobar }} gets the main slot from the page Foobar. An additional third parameter can be set to anything to have the returned content parsed.

#slotdata

The extension provides the #slotdata parser function to get structured content from a specific slot. The syntax of the parser function is as follows:

This function is aware of the content model of the page. This means that it parses a page differently, depending on what the content model is. The content models from which it can extract structured data are:

#slottemplates (deprecated)

The extension also provides the #slottemplates parser function that returns the templates in a specific slot as a multidimensional array. This parser function required WSArrays to be installed.

The parser function has two modes of operation. It can either process templates non-recursively (DEPRECATED), or it can process them recursively (RECOMMENDED). With the non-recursive parser function, multiple templates with the same name are not supported and nested template calls are not processed. With recursive parsing, this is supported. Recursive parsing also supports retrieving the original unparsed content of an argument.

The syntax of the parser function is as follows:

Lua functions

The following Lua functions are available:

mw.slots.slotContent(slotName, pageName)

Mirrors the functionality of the #slot parser function and makes it available in Lua. It takes the following parameters:

mw.slots.slotTemplates(slotName, pageName) (deprecated)

Mirrors the functionality of the #slottemplates parser function and makes it available in Lua. It takes the following parameters:

This function is deprecated and will be replaced by mw.slots.slotData() soon.

mw.slots.slotContentModel(slotName, pageName)

Returns the content model of the specified slot. It takes the following parameters:

mw.slots.slotData(slotName, pageName)

Mirrors the functionality of the #slotdata parser function and makes it available in Lua. This function omits any advanced selection tools (JSONPath). It takes the following parameters:

Actions

rawslot

Slot-aware version of action=raw (see RawAction). Returns the content of the specified slot as raw value (format depends on the slot content model). Example:


All versions of w-s-slots with dependencies

PHP Build Version
Package Version
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 open-csp/w-s-slots contains the following files

Loading the files please wait ....