summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-20 13:11:41 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-20 13:11:41 -0400
commita0124b45f9dab8a0f7d4879d4ea147b414b25bf2 (patch)
tree4f1a419104374591e269e9f32838ca500245fe1a /app/Core
parentfe57edd9e87832dbd14ea8ffd2dc2f16ac1ceb6f (diff)
Add sub namespace for plugins
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Plugin/Base.php (renamed from app/Core/PluginBase.php)6
-rw-r--r--app/Core/Plugin/Loader.php (renamed from app/Core/PluginLoader.php)13
2 files changed, 10 insertions, 9 deletions
diff --git a/app/Core/PluginBase.php b/app/Core/Plugin/Base.php
index 457afa03..580d41ad 100644
--- a/app/Core/PluginBase.php
+++ b/app/Core/Plugin/Base.php
@@ -1,14 +1,14 @@
<?php
-namespace Core;
+namespace Core\Plugin;
/**
* Plugin Base class
*
- * @package core
+ * @package plugin
* @author Frederic Guillot
*/
-abstract class PluginBase extends Base
+abstract class Base extends \Core\Base
{
/**
* Method called for each request
diff --git a/app/Core/PluginLoader.php b/app/Core/Plugin/Loader.php
index c7c254f7..ffead9f6 100644
--- a/app/Core/PluginLoader.php
+++ b/app/Core/Plugin/Loader.php
@@ -1,17 +1,18 @@
<?php
-namespace Core;
+namespace Core\Plugin;
use DirectoryIterator;
use PDOException;
+use Core\Tool;
/**
* Plugin Loader
*
- * @package core
+ * @package plugin
* @author Frederic Guillot
*/
-class PluginLoader extends Base
+class Loader extends \Core\Base
{
/**
* Schema version table for plugins
@@ -27,8 +28,8 @@ class PluginLoader extends Base
*/
public function scan()
{
- if (file_exists(__DIR__.'/../../plugins')) {
- $dir = new DirectoryIterator(__DIR__.'/../../plugins');
+ if (file_exists(__DIR__.'/../../../plugins')) {
+ $dir = new DirectoryIterator(__DIR__.'/../../../plugins');
foreach ($dir as $fileinfo) {
if (! $fileinfo->isDot() && $fileinfo->isDir()) {
@@ -63,7 +64,7 @@ class PluginLoader extends Base
*/
public function loadSchema($plugin)
{
- $filename = __DIR__.'/../../plugins/'.$plugin.'/Schema/'.ucfirst(DB_DRIVER).'.php';
+ $filename = __DIR__.'/../../../plugins/'.$plugin.'/Schema/'.ucfirst(DB_DRIVER).'.php';
if (file_exists($filename)) {
require($filename);