diff options
| author | Eole <EoleDev@outlook.fr> | 2016-01-25 23:36:23 +0100 |
|---|---|---|
| committer | Eole <EoleDev@outlook.fr> | 2016-01-25 23:36:23 +0100 |
| commit | ef05e8a90d64022d6ecfbcb8ed0ab92d53adf243 (patch) | |
| tree | 6200a6a4d66aaaf29e803ab32cc44c702502dc19 | |
| parent | e17f02814d59aeada052e52116938b34a0bb2b48 (diff) | |
Init core class, Init plugin functionnality
| -rw-r--r-- | server/core/Compute.php | 1 | ||||
| -rw-r--r-- | server/core/Identity.php | 1 | ||||
| -rw-r--r-- | server/core/Image.php | 1 | ||||
| -rw-r--r-- | server/core/Network.php | 1 | ||||
| -rw-r--r-- | server/core/Plugin.php | 13 | ||||
| -rw-r--r-- | server/core/Plugin_Api.php | 24 | ||||
| -rw-r--r-- | server/index.php | 3 | ||||
| -rw-r--r-- | server/init.php | 2 |
8 files changed, 46 insertions, 0 deletions
diff --git a/server/core/Compute.php b/server/core/Compute.php new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/server/core/Compute.php @@ -0,0 +1 @@ + diff --git a/server/core/Identity.php b/server/core/Identity.php new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/server/core/Identity.php @@ -0,0 +1 @@ + diff --git a/server/core/Image.php b/server/core/Image.php new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/server/core/Image.php @@ -0,0 +1 @@ + diff --git a/server/core/Network.php b/server/core/Network.php new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/server/core/Network.php @@ -0,0 +1 @@ + diff --git a/server/core/Plugin.php b/server/core/Plugin.php new file mode 100644 index 0000000..e6fd8a7 --- /dev/null +++ b/server/core/Plugin.php @@ -0,0 +1,13 @@ +<?php + +abstract class plugin{ + + public $api; + + public function __construct($api){ + + $this->api = $api; + + } + +} diff --git a/server/core/Plugin_Api.php b/server/core/Plugin_Api.php new file mode 100644 index 0000000..28e1407 --- /dev/null +++ b/server/core/Plugin_Api.php @@ -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; + } +} diff --git a/server/index.php b/server/index.php index 4d43a4c..ca84641 100644 --- a/server/index.php +++ b/server/index.php @@ -3,4 +3,7 @@ include_once("config.inc.php"); include_once("init.php"); + $task = $_POST["task"]; + $action = $_POST["action"]; + diff --git a/server/init.php b/server/init.php index b6cc02b..ff7f90b 100644 --- a/server/init.php +++ b/server/init.php @@ -1,5 +1,6 @@ <?php include_once("config.inc.php"); + include_once("core/Plugin_Api.php"); require "vendor/autoload.php"; //traitement requete, recuperation data @@ -32,4 +33,5 @@ $openstack_api = new OpenStack\OpenStack($Args); + $pluginApi = plugin_api::getInstance(); ?> |
