Change namespace to add Kanboard as prefix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Plugin;
|
||||
namespace Kanboard\Core\Plugin;
|
||||
|
||||
/**
|
||||
* Plugin Base class
|
||||
@@ -8,7 +8,7 @@ namespace Core\Plugin;
|
||||
* @package plugin
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
abstract class Base extends \Core\Base
|
||||
abstract class Base extends \Kanboard\Core\Base
|
||||
{
|
||||
/**
|
||||
* Method called for each request
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Plugin;
|
||||
namespace Kanboard\Core\Plugin;
|
||||
|
||||
/**
|
||||
* Plugin Hooks Handler
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Plugin;
|
||||
namespace Kanboard\Core\Plugin;
|
||||
|
||||
use DirectoryIterator;
|
||||
use PDOException;
|
||||
use Core\Tool;
|
||||
use Kanboard\Core\Tool;
|
||||
|
||||
/**
|
||||
* Plugin Loader
|
||||
@@ -12,7 +12,7 @@ use Core\Tool;
|
||||
* @package plugin
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class Loader extends \Core\Base
|
||||
class Loader extends \Kanboard\Core\Base
|
||||
{
|
||||
/**
|
||||
* Schema version table for plugins
|
||||
@@ -57,7 +57,7 @@ class Loader extends \Core\Base
|
||||
*/
|
||||
public function load($plugin)
|
||||
{
|
||||
$class = '\Plugin\\'.$plugin.'\\Plugin';
|
||||
$class = '\Kanboard\Plugin\\'.$plugin.'\\Plugin';
|
||||
$instance = new $class($this->container);
|
||||
|
||||
Tool::buildDic($this->container, $instance->getClasses());
|
||||
@@ -90,7 +90,7 @@ class Loader extends \Core\Base
|
||||
*/
|
||||
public function migrateSchema($plugin)
|
||||
{
|
||||
$last_version = constant('\Plugin\\'.$plugin.'\Schema\VERSION');
|
||||
$last_version = constant('\Kanboard\Plugin\\'.$plugin.'\Schema\VERSION');
|
||||
$current_version = $this->getSchemaVersion($plugin);
|
||||
|
||||
try {
|
||||
@@ -99,7 +99,7 @@ class Loader extends \Core\Base
|
||||
$this->db->getDriver()->disableForeignKeys();
|
||||
|
||||
for ($i = $current_version + 1; $i <= $last_version; $i++) {
|
||||
$function_name = '\Plugin\\'.$plugin.'\Schema\version_'.$i;
|
||||
$function_name = '\Kanboard\Plugin\\'.$plugin.'\Schema\version_'.$i;
|
||||
|
||||
if (function_exists($function_name)) {
|
||||
call_user_func($function_name, $this->db->getConnection());
|
||||
|
||||
Reference in New Issue
Block a user