Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
PluginRepository Class Reference

Public Member Functions

 __construct ($url=null)
 
 readMetadata ($url)
 
 getPlugin ($name)
 
 getPlugins ($search=null)
 

Protected Member Functions

 registerPlugin ($name, $meta_data)
 

Detailed Description

Class used to locate plugins available from a plugin repository.

Constructor & Destructor Documentation

__construct (   $url = null)

Initialize a new PluginRepository and read meta data from the given URL or the default list of URLs (if $url is null).

Member Function Documentation

getPlugin (   $name)

Get meta data for the plugin with the given name (if available). Always chooses the newest compatible version of the plugin.

Parameters
string$namename of the plgin
Returns
array meta data for plugin (or null)
getPlugins (   $search = null)

Get meta data for all plugins whose names contain the given string. You may omit the search string to get a list of all available plugins. Returns the newest compatible version of each plugin.

Parameters
string$searchsearch string
Returns
array array of meta data for matching plugins
readMetadata (   $url)

Read plugin meta data from the given URL (using XML format). The structure of the XML is:

<plugins> <plugin name="DummyPlugin" <release version="2.0" url="http://plugins.example.com/dummy-2.0.zip" studipminversion="1.4" studipmaxversion="1.9"> </plugin> [...] </plugins>

Parameters
string$urlplugin repository url
registerPlugin (   $name,
  $meta_data 
)
protected

Register a new plugin in this repository.

Parameters
string$nameplugin name
array$meta_dataplugin meta data

The documentation for this class was generated from the following file: