Change namespace to add Kanboard as prefix

This commit is contained in:
Frederic Guillot
2015-10-13 22:19:17 -04:00
parent 7bfa38d93c
commit 9c9ed02cd7
329 changed files with 1184 additions and 1149 deletions

View File

@@ -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());