Handle plugin packages easily.
This file is part of Ratatöskr. Unlike the other parts of Ratatöskr, this file ist not licensed under the MIT / X11 License, but under the WTFPL, to make it even easier to use this file in other projects. See “ratatoeskr/licenses/wtfpl” for more information.
ratatoeskr/ | Handle plugin packages easily. |
Functions | |
dir2array | Pack a directory into an array. |
array2dir | Unpack an array into a directory. |
InvalidPackage | An Exception that PluginPackage’s function can throw, if the package is invalid. |
PluginPackage | A plugin package representation. |
Variables | |
Mandatory values | |
Optional values | |
Functions | |
validate | Validate, if the variables are set correctly. |
load | Load a plugin package from binary data. |
save | Save the plugin. |
extract_meta | Get just the metadata of this package. |
PluginPackageMeta | Only the metadata of a PluginPackage. |
Variables | |
Mandatory values | |
Optional values |
An Exception that PluginPackage’s function can throw, if the package is invalid.
A plugin package representation.
Variables | |
Mandatory values | |
Optional values | |
Functions | |
validate | Validate, if the variables are set correctly. |
load | Load a plugin package from binary data. |
save | Save the plugin. |
extract_meta | Get just the metadata of this package. |
$updatepath | A URL that points to a update information resource (serialize’d array(“current-version” => VERSIONCOUNT, “dl-path” => DOWNLOAD PATH); will get overwritten/set by the default repository software. |
$web | A URL to the webpage for the plugin. If left empty, the default repository software will set this to the description page of your plugin. |
$license | The license text of your plugin. |
$help | A help / manual (formatted in HTML) for your plugin. |
$custompub | dir2array ‘d directory that contains custom public(i.e. can later be accessed from the web) data. |
$custompriv | dir2array ‘d directory that contains custom private data. |
$tpls | dir2array ‘d directory containing custom STE templates. |
public function validate()
Validate, if the variables are set correctly. Will throw an InvalidPackage exception if invalid.
public static function load( $plugin_raw )
Load a plugin package from binary data.
$plugin_raw | The raw package to load. |
The PluginPackage object.
InvalidPackage if package is invalid.
public function save()
Save the plugin.
A binary plugin package.
InvalidPackage if package is invalid.
public function extract_meta()
Get just the metadata of this package.
A PluginPackageMeta object.
Only the metadata of a PluginPackage.
Pack a directory into an array.
function dir2array( $dir )
Unpack an array into a directory.
function array2dir( $a, $dir )
Validate, if the variables are set correctly.
public function validate()
Load a plugin package from binary data.
public static function load( $plugin_raw )
Save the plugin.
public function save()
Get just the metadata of this package.
public function extract_meta()