Init core class, Init plugin functionnality

This commit is contained in:
Eole 2016-01-25 23:36:23 +01:00
parent e17f02814d
commit ef05e8a90d
8 changed files with 46 additions and 0 deletions

1
server/core/Compute.php Normal file
View file

@ -0,0 +1 @@

1
server/core/Identity.php Normal file
View file

@ -0,0 +1 @@

1
server/core/Image.php Normal file
View file

@ -0,0 +1 @@

1
server/core/Network.php Normal file
View file

@ -0,0 +1 @@

13
server/core/Plugin.php Normal file
View file

@ -0,0 +1,13 @@
<?php
abstract class plugin{
public $api;
public function __construct($api){
$this->api = $api;
}
}

View file

@ -0,0 +1,24 @@
<?php
//Init plugin directory
if (!defined('RCUBE_PLUGINS_DIR')) {
define('RCUBE_PLUGINS_DIR', RCUBE_INSTALL_PATH . 'plugins/');
}
class plugin_api{
static protected $instance;
protected function __construct(){
}
static function getInstance(){
if(!self::$instance){
self::$instance = new plugin_api();
}
return self::$instance;
}
}