Init core class, Init plugin functionnality
This commit is contained in:
parent
e17f02814d
commit
ef05e8a90d
8 changed files with 46 additions and 0 deletions
1
server/core/Compute.php
Normal file
1
server/core/Compute.php
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
server/core/Identity.php
Normal file
1
server/core/Identity.php
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
server/core/Image.php
Normal file
1
server/core/Image.php
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
server/core/Network.php
Normal file
1
server/core/Network.php
Normal file
|
@ -0,0 +1 @@
|
|||
|
13
server/core/Plugin.php
Normal file
13
server/core/Plugin.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
abstract class plugin{
|
||||
|
||||
public $api;
|
||||
|
||||
public function __construct($api){
|
||||
|
||||
$this->api = $api;
|
||||
|
||||
}
|
||||
|
||||
}
|
24
server/core/Plugin_Api.php
Normal file
24
server/core/Plugin_Api.php
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue