From 99f904adcc37d93c90defcd8ce898598e25be212 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 11 Mar 2015 16:55:04 +0100 Subject: Lot of plugins --- myrc_branch/myrc_branch.php | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 myrc_branch/myrc_branch.php (limited to 'myrc_branch/myrc_branch.php') diff --git a/myrc_branch/myrc_branch.php b/myrc_branch/myrc_branch.php new file mode 100644 index 0000000..8195933 --- /dev/null +++ b/myrc_branch/myrc_branch.php @@ -0,0 +1,65 @@ +Documentation'; + static private $version = '3.0.2'; + static private $date = '26-12-2014'; + static private $licence = 'GPL'; + static private $requirements = array( + 'Roundcube' => '1.0.3', + 'PHP' => '5.3' + ); + + function init(){ + define('MYRC_BRANCH', 'stable'); + define('MYRC_BUNDLE', self::$version); + } + + static public function about($keys = false){ + $requirements = self::$requirements; + foreach(array('required_', 'recommended_') as $prefix){ + if(is_array($requirements[$prefix.'plugins'])){ + foreach($requirements[$prefix.'plugins'] as $plugin => $method){ + if(class_exists($plugin) && method_exists($plugin, 'about')){ + /* PHP 5.2.x workaround for $plugin::about() */ + $class = new $plugin(false); + $requirements[$prefix.'plugins'][$plugin] = array( + 'method' => $method, + 'plugin' => $class->about($keys), + ); + } + else{ + $requirements[$prefix.'plugins'][$plugin] = array( + 'method' => $method, + 'plugin' => $plugin, + ); + } + } + } + } + return array( + 'plugin' => self::$plugin, + 'version' => self::$version, + 'date' => self::$date, + 'author' => self::$author, + 'comments' => self::$authors_comments, + 'licence' => self::$licence, + 'requirements' => $requirements, + ); + } +} +?> \ No newline at end of file -- cgit v1.2.3