Revision 3731:3770620079d4,
1.7 KB
checked in by franck <carnet.franck.paul@…>, 8 years ago
(diff) |
Simplify licence block at the beginning of each file
|
Rev | Line | |
---|
[2492] | 1 | <?php |
---|
[3731] | 2 | /** |
---|
| 3 | * @brief Plugins specific handler |
---|
| 4 | * |
---|
| 5 | * An instance of this class is provided by dcCore $plugins property |
---|
| 6 | * and used for plugins. |
---|
| 7 | * |
---|
| 8 | * @package Dotclear |
---|
| 9 | * @subpackage Core |
---|
| 10 | * |
---|
| 11 | * @copyright Olivier Meunier & Association Dotclear |
---|
| 12 | * @copyright GPL-2.0-only |
---|
| 13 | * |
---|
| 14 | * @since 2.6 |
---|
| 15 | */ |
---|
| 16 | |
---|
[3730] | 17 | if (!defined('DC_RC_PATH')) {return;} |
---|
[2492] | 18 | |
---|
| 19 | /** |
---|
| 20 | @ingroup DC_CORE |
---|
| 21 | |
---|
[3730] | 22 | */ |
---|
[2492] | 23 | class dcPlugins extends dcModules |
---|
[2566] | 24 | { |
---|
[3730] | 25 | protected static $type = 'plugin'; |
---|
[2492] | 26 | |
---|
[3730] | 27 | /** |
---|
| 28 | This method registers a plugin in modules list. You should use this to |
---|
| 29 | register a new plugin. |
---|
[2566] | 30 | |
---|
[3730] | 31 | <var>$priority</var> is an integer. Modules are sorted by priority and name. |
---|
| 32 | Lowest priority comes first. This property is currently ignored when dealing |
---|
| 33 | with themes. |
---|
[2566] | 34 | |
---|
[3730] | 35 | @param name <b>string</b> Module name |
---|
| 36 | @param desc <b>string</b> Module description |
---|
| 37 | @param author <b>string</b> Module author name |
---|
| 38 | @param version <b>string</b> Module version |
---|
| 39 | @param properties <b>array</b> extra properties (currently available keys : permissions, priority, standalone_config, type) |
---|
| 40 | */ |
---|
| 41 | public function registerModule($name, $desc, $author, $version, $properties = array()) |
---|
| 42 | { |
---|
| 43 | # Fallback to legacy registerModule parameters |
---|
| 44 | if (!is_array($properties)) { |
---|
| 45 | $args = func_get_args(); |
---|
| 46 | $properties = array(); |
---|
| 47 | if (isset($args[4])) { |
---|
| 48 | $properties['permissions'] = $args[4]; |
---|
| 49 | } |
---|
| 50 | if (isset($args[5])) { |
---|
| 51 | $properties['priority'] = (integer) $args[5]; |
---|
| 52 | } |
---|
| 53 | } |
---|
[2492] | 54 | |
---|
[3730] | 55 | parent::registerModule($name, $desc, $author, $version, $properties); |
---|
| 56 | } |
---|
[2492] | 57 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.