summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-13 22:19:17 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-13 22:19:17 -0400
commit9c9ed02cd7ebc5dbbc99bcaed6f80988ce8a9677 (patch)
treec58789631d8f729dca8dbbf4108670e567dc25b4 /app/Core
parent7bfa38d93c7342fc5dc04722e7bc282f165b8cd4 (diff)
Change namespace to add Kanboard as prefix
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Base.php162
-rw-r--r--app/Core/Cache/Base.php2
-rw-r--r--app/Core/Cache/CacheInterface.php2
-rw-r--r--app/Core/Cache/MemoryCache.php2
-rw-r--r--app/Core/Csv.php2
-rw-r--r--app/Core/EmailClient.php2
-rw-r--r--app/Core/Helper.php4
-rw-r--r--app/Core/HttpClient.php2
-rw-r--r--app/Core/Lexer.php2
-rw-r--r--app/Core/Markdown.php4
-rw-r--r--app/Core/NotificationInterface.php2
-rw-r--r--app/Core/OAuth2.php2
-rw-r--r--app/Core/ObjectStorage/FileStorage.php2
-rw-r--r--app/Core/ObjectStorage/ObjectStorageException.php2
-rw-r--r--app/Core/ObjectStorage/ObjectStorageInterface.php2
-rw-r--r--app/Core/Paginator.php2
-rw-r--r--app/Core/Plugin/Base.php4
-rw-r--r--app/Core/Plugin/Hook.php2
-rw-r--r--app/Core/Plugin/Loader.php12
-rw-r--r--app/Core/Request.php2
-rw-r--r--app/Core/Response.php2
-rw-r--r--app/Core/Router.php5
-rw-r--r--app/Core/Security.php2
-rw-r--r--app/Core/Session.php2
-rw-r--r--app/Core/Template.php2
-rw-r--r--app/Core/Tool.php4
-rw-r--r--app/Core/Translator.php2
27 files changed, 118 insertions, 117 deletions
diff --git a/app/Core/Base.php b/app/Core/Base.php
index 7503e840..331b67e3 100644
--- a/app/Core/Base.php
+++ b/app/Core/Base.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use Pimple\Container;
@@ -10,86 +10,86 @@ use Pimple\Container;
* @package core
* @author Frederic Guillot
*
- * @property \Core\Helper $helper
- * @property \Core\EmailClient $emailClient
- * @property \Core\HttpClient $httpClient
- * @property \Core\Paginator $paginator
- * @property \Core\Request $request
- * @property \Core\Session $session
- * @property \Core\Template $template
- * @property \Core\OAuth2 $oauth
- * @property \Core\Router $router
- * @property \Core\Lexer $lexer
- * @property \Core\ObjectStorage\ObjectStorageInterface $objectStorage
- * @property \Core\Cache\Cache $memoryCache
- * @property \Core\Plugin\Hook $hook
- * @property \Core\Plugin\Loader $pluginLoader
- * @property \Integration\BitbucketWebhook $bitbucketWebhook
- * @property \Integration\GithubWebhook $githubWebhook
- * @property \Integration\GitlabWebhook $gitlabWebhook
- * @property \Integration\HipchatWebhook $hipchatWebhook
- * @property \Integration\Jabber $jabber
- * @property \Integration\Mailgun $mailgun
- * @property \Integration\Postmark $postmark
- * @property \Integration\Sendgrid $sendgrid
- * @property \Integration\SlackWebhook $slackWebhook
- * @property \Integration\Smtp $smtp
- * @property \Formatter\ProjectGanttFormatter $projectGanttFormatter
- * @property \Formatter\TaskFilterGanttFormatter $taskFilterGanttFormatter
- * @property \Formatter\TaskFilterAutoCompleteFormatter $taskFilterAutoCompleteFormatter
- * @property \Formatter\TaskFilterCalendarFormatter $taskFilterCalendarFormatter
- * @property \Formatter\TaskFilterICalendarFormatter $taskFilterICalendarFormatter
- * @property \Model\Acl $acl
- * @property \Model\Action $action
- * @property \Model\Authentication $authentication
- * @property \Model\Board $board
- * @property \Model\Category $category
- * @property \Model\Color $color
- * @property \Model\Comment $comment
- * @property \Model\Config $config
- * @property \Model\Currency $currency
- * @property \Model\CustomFilter $customFilter
- * @property \Model\DateParser $dateParser
- * @property \Model\File $file
- * @property \Model\LastLogin $lastLogin
- * @property \Model\Link $link
- * @property \Model\Notification $notification
- * @property \Model\NotificationType $notificationType
- * @property \Model\NotificationFilter $notificationFilter
- * @property \Model\OverdueNotification $overdueNotification
- * @property \Model\WebNotification $webNotification
- * @property \Model\Project $project
- * @property \Model\ProjectActivity $projectActivity
- * @property \Model\ProjectAnalytic $projectAnalytic
- * @property \Model\ProjectDuplication $projectDuplication
- * @property \Model\ProjectDailyColumnStats $projectDailyColumnStats
- * @property \Model\ProjectDailyStats $projectDailyStats
- * @property \Model\ProjectIntegration $projectIntegration
- * @property \Model\ProjectPermission $projectPermission
- * @property \Model\Subtask $subtask
- * @property \Model\SubtaskExport $subtaskExport
- * @property \Model\SubtaskTimeTracking $subtaskTimeTracking
- * @property \Model\Swimlane $swimlane
- * @property \Model\Task $task
- * @property \Model\TaskAnalytic $taskAnalytic
- * @property \Model\TaskCreation $taskCreation
- * @property \Model\TaskDuplication $taskDuplication
- * @property \Model\TaskExport $taskExport
- * @property \Model\TaskFinder $taskFinder
- * @property \Model\TaskFilter $taskFilter
- * @property \Model\TaskLink $taskLink
- * @property \Model\TaskModification $taskModification
- * @property \Model\TaskPermission $taskPermission
- * @property \Model\TaskPosition $taskPosition
- * @property \Model\TaskStatus $taskStatus
- * @property \Model\TaskValidator $taskValidator
- * @property \Model\Transition $transition
- * @property \Model\User $user
- * @property \Model\UserSession $userSession
- * @property \Model\Webhook $webhook
- * @property \Psr\Log\LoggerInterface $logger
- * @property \League\HTMLToMarkdown\HtmlConverter $htmlConverter
- * @property \PicoDb\Database $db
+ * @property \Kanboard\Core\Helper $helper
+ * @property \Kanboard\Core\EmailClient $emailClient
+ * @property \Kanboard\Core\HttpClient $httpClient
+ * @property \Kanboard\Core\Paginator $paginator
+ * @property \Kanboard\Core\Request $request
+ * @property \Kanboard\Core\Session $session
+ * @property \Kanboard\Core\Template $template
+ * @property \Kanboard\Core\OAuth2 $oauth
+ * @property \Kanboard\Core\Router $router
+ * @property \Kanboard\Core\Lexer $lexer
+ * @property \Kanboard\Core\ObjectStorage\ObjectStorageInterface $objectStorage
+ * @property \Kanboard\Core\Cache\Cache $memoryCache
+ * @property \Kanboard\Core\Plugin\Hook $hook
+ * @property \Kanboard\Core\Plugin\Loader $pluginLoader
+ * @property \Kanboard\Integration\BitbucketWebhook $bitbucketWebhook
+ * @property \Kanboard\Integration\GithubWebhook $githubWebhook
+ * @property \Kanboard\Integration\GitlabWebhook $gitlabWebhook
+ * @property \Kanboard\Integration\HipchatWebhook $hipchatWebhook
+ * @property \Kanboard\Integration\Jabber $jabber
+ * @property \Kanboard\Integration\Mailgun $mailgun
+ * @property \Kanboard\Integration\Postmark $postmark
+ * @property \Kanboard\Integration\Sendgrid $sendgrid
+ * @property \Kanboard\Integration\SlackWebhook $slackWebhook
+ * @property \Kanboard\Integration\Smtp $smtp
+ * @property \Kanboard\Formatter\ProjectGanttFormatter $projectGanttFormatter
+ * @property \Kanboard\Formatter\TaskFilterGanttFormatter $taskFilterGanttFormatter
+ * @property \Kanboard\Formatter\TaskFilterAutoCompleteFormatter $taskFilterAutoCompleteFormatter
+ * @property \Kanboard\Formatter\TaskFilterCalendarFormatter $taskFilterCalendarFormatter
+ * @property \Kanboard\Formatter\TaskFilterICalendarFormatter $taskFilterICalendarFormatter
+ * @property \Kanboard\Model\Acl $acl
+ * @property \Kanboard\Model\Action $action
+ * @property \Kanboard\Model\Authentication $authentication
+ * @property \Kanboard\Model\Board $board
+ * @property \Kanboard\Model\Category $category
+ * @property \Kanboard\Model\Color $color
+ * @property \Kanboard\Model\Comment $comment
+ * @property \Kanboard\Model\Config $config
+ * @property \Kanboard\Model\Currency $currency
+ * @property \Kanboard\Model\CustomFilter $customFilter
+ * @property \Kanboard\Model\DateParser $dateParser
+ * @property \Kanboard\Model\File $file
+ * @property \Kanboard\Model\LastLogin $lastLogin
+ * @property \Kanboard\Model\Link $link
+ * @property \Kanboard\Model\Notification $notification
+ * @property \Kanboard\Model\NotificationType $notificationType
+ * @property \Kanboard\Model\NotificationFilter $notificationFilter
+ * @property \Kanboard\Model\OverdueNotification $overdueNotification
+ * @property \Kanboard\Model\WebNotification $webNotification
+ * @property \Kanboard\Model\Project $project
+ * @property \Kanboard\Model\ProjectActivity $projectActivity
+ * @property \Kanboard\Model\ProjectAnalytic $projectAnalytic
+ * @property \Kanboard\Model\ProjectDuplication $projectDuplication
+ * @property \Kanboard\Model\ProjectDailyColumnStats $projectDailyColumnStats
+ * @property \Kanboard\Model\ProjectDailyStats $projectDailyStats
+ * @property \Kanboard\Model\ProjectIntegration $projectIntegration
+ * @property \Kanboard\Model\ProjectPermission $projectPermission
+ * @property \Kanboard\Model\Subtask $subtask
+ * @property \Kanboard\Model\SubtaskExport $subtaskExport
+ * @property \Kanboard\Model\SubtaskTimeTracking $subtaskTimeTracking
+ * @property \Kanboard\Model\Swimlane $swimlane
+ * @property \Kanboard\Model\Task $task
+ * @property \Kanboard\Model\TaskAnalytic $taskAnalytic
+ * @property \Kanboard\Model\TaskCreation $taskCreation
+ * @property \Kanboard\Model\TaskDuplication $taskDuplication
+ * @property \Kanboard\Model\TaskExport $taskExport
+ * @property \Kanboard\Model\TaskFinder $taskFinder
+ * @property \Kanboard\Model\TaskFilter $taskFilter
+ * @property \Kanboard\Model\TaskLink $taskLink
+ * @property \Kanboard\Model\TaskModification $taskModification
+ * @property \Kanboard\Model\TaskPermission $taskPermission
+ * @property \Kanboard\Model\TaskPosition $taskPosition
+ * @property \Kanboard\Model\TaskStatus $taskStatus
+ * @property \Kanboard\Model\TaskValidator $taskValidator
+ * @property \Kanboard\Model\Transition $transition
+ * @property \Kanboard\Model\User $user
+ * @property \Kanboard\Model\UserSession $userSession
+ * @property \Kanboard\Model\Webhook $webhook
+ * @property \Psr\Log\LoggerInterface $logger
+ * @property \League\HTMLToMarkdown\HtmlConverter $htmlConverter
+ * @property \PicoDb\Database $db
*/
abstract class Base
{
diff --git a/app/Core/Cache/Base.php b/app/Core/Cache/Base.php
index a16c12f0..d62b8507 100644
--- a/app/Core/Cache/Base.php
+++ b/app/Core/Cache/Base.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\Cache;
+namespace Kanboard\Core\Cache;
/**
* Base class for cache drivers
diff --git a/app/Core/Cache/CacheInterface.php b/app/Core/Cache/CacheInterface.php
index 8675ef8e..d9e9747a 100644
--- a/app/Core/Cache/CacheInterface.php
+++ b/app/Core/Cache/CacheInterface.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\Cache;
+namespace Kanboard\Core\Cache;
/**
* Cache Interface
diff --git a/app/Core/Cache/MemoryCache.php b/app/Core/Cache/MemoryCache.php
index b1de96bc..c4fb7ca4 100644
--- a/app/Core/Cache/MemoryCache.php
+++ b/app/Core/Cache/MemoryCache.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\Cache;
+namespace Kanboard\Core\Cache;
/**
* Memory Cache
diff --git a/app/Core/Csv.php b/app/Core/Csv.php
index 6e7816f6..37f51b27 100644
--- a/app/Core/Csv.php
+++ b/app/Core/Csv.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use SplFileObject;
diff --git a/app/Core/EmailClient.php b/app/Core/EmailClient.php
index b1986502..38d6b3f1 100644
--- a/app/Core/EmailClient.php
+++ b/app/Core/EmailClient.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Mail client
diff --git a/app/Core/Helper.php b/app/Core/Helper.php
index 64eaed23..5edaa3f0 100644
--- a/app/Core/Helper.php
+++ b/app/Core/Helper.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use Pimple\Container;
@@ -60,7 +60,7 @@ class Helper
public function __get($name)
{
if (! isset($this->helpers[$name])) {
- $class = '\Helper\\'.ucfirst($name);
+ $class = '\Kanboard\Helper\\'.ucfirst($name);
$this->helpers[$name] = new $class($this->container);
}
diff --git a/app/Core/HttpClient.php b/app/Core/HttpClient.php
index 99534cfe..4ec5396e 100644
--- a/app/Core/HttpClient.php
+++ b/app/Core/HttpClient.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* HTTP client
diff --git a/app/Core/Lexer.php b/app/Core/Lexer.php
index d7e6fde4..92443c2c 100644
--- a/app/Core/Lexer.php
+++ b/app/Core/Lexer.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Lexer
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php
index fa4e8080..4101a3b3 100644
--- a/app/Core/Markdown.php
+++ b/app/Core/Markdown.php
@@ -1,9 +1,9 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use Parsedown;
-use Helper\Url;
+use Kanboard\Helper\Url;
/**
* Specific Markdown rules for Kanboard
diff --git a/app/Core/NotificationInterface.php b/app/Core/NotificationInterface.php
index 5dca74e5..b6cd1781 100644
--- a/app/Core/NotificationInterface.php
+++ b/app/Core/NotificationInterface.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Notification Interface
diff --git a/app/Core/OAuth2.php b/app/Core/OAuth2.php
index a7d04f33..ee6a7837 100644
--- a/app/Core/OAuth2.php
+++ b/app/Core/OAuth2.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* OAuth2 client
diff --git a/app/Core/ObjectStorage/FileStorage.php b/app/Core/ObjectStorage/FileStorage.php
index 75160e79..683a9e7f 100644
--- a/app/Core/ObjectStorage/FileStorage.php
+++ b/app/Core/ObjectStorage/FileStorage.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\ObjectStorage;
+namespace Kanboard\Core\ObjectStorage;
/**
* Local File Storage
diff --git a/app/Core/ObjectStorage/ObjectStorageException.php b/app/Core/ObjectStorage/ObjectStorageException.php
index e89aeb25..9e98ff51 100644
--- a/app/Core/ObjectStorage/ObjectStorageException.php
+++ b/app/Core/ObjectStorage/ObjectStorageException.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\ObjectStorage;
+namespace Kanboard\Core\ObjectStorage;
use Exception;
diff --git a/app/Core/ObjectStorage/ObjectStorageInterface.php b/app/Core/ObjectStorage/ObjectStorageInterface.php
index 48444d2d..92277084 100644
--- a/app/Core/ObjectStorage/ObjectStorageInterface.php
+++ b/app/Core/ObjectStorage/ObjectStorageInterface.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\ObjectStorage;
+namespace Kanboard\Core\ObjectStorage;
/**
* Object Storage Interface
diff --git a/app/Core/Paginator.php b/app/Core/Paginator.php
index d00df7ce..763cb8b9 100644
--- a/app/Core/Paginator.php
+++ b/app/Core/Paginator.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use Pimple\Container;
use PicoDb\Table;
diff --git a/app/Core/Plugin/Base.php b/app/Core/Plugin/Base.php
index 1b7ac8f5..d8b196e1 100644
--- a/app/Core/Plugin/Base.php
+++ b/app/Core/Plugin/Base.php
@@ -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
diff --git a/app/Core/Plugin/Hook.php b/app/Core/Plugin/Hook.php
index fa14af13..a3bcd918 100644
--- a/app/Core/Plugin/Hook.php
+++ b/app/Core/Plugin/Hook.php
@@ -1,6 +1,6 @@
<?php
-namespace Core\Plugin;
+namespace Kanboard\Core\Plugin;
/**
* Plugin Hooks Handler
diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php
index 9a884dae..ea512c4e 100644
--- a/app/Core/Plugin/Loader.php
+++ b/app/Core/Plugin/Loader.php
@@ -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());
diff --git a/app/Core/Request.php b/app/Core/Request.php
index d0fcdb8e..f553d7cd 100644
--- a/app/Core/Request.php
+++ b/app/Core/Request.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Request class
diff --git a/app/Core/Response.php b/app/Core/Response.php
index 71d99524..c27f0a1d 100644
--- a/app/Core/Response.php
+++ b/app/Core/Response.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Response class
diff --git a/app/Core/Router.php b/app/Core/Router.php
index 55ebe4a8..8f366daf 100644
--- a/app/Core/Router.php
+++ b/app/Core/Router.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Router class
@@ -219,7 +219,8 @@ class Router extends Base
$plugin = '';
}
- $class = empty($plugin) ? '\Controller\\'.ucfirst($this->controller) : '\Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($this->controller);
+ $class = '\Kanboard\\';
+ $class .= empty($plugin) ? 'Controller\\'.ucfirst($this->controller) : 'Plugin\\'.ucfirst($plugin).'\Controller\\'.ucfirst($this->controller);
$instance = new $class($this->container);
$instance->beforeAction($this->controller, $this->action);
diff --git a/app/Core/Security.php b/app/Core/Security.php
index 0bd7c991..126de2fd 100644
--- a/app/Core/Security.php
+++ b/app/Core/Security.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Security class
diff --git a/app/Core/Session.php b/app/Core/Session.php
index 4f5fde70..a93131c7 100644
--- a/app/Core/Session.php
+++ b/app/Core/Session.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use ArrayAccess;
diff --git a/app/Core/Template.php b/app/Core/Template.php
index 9ca904de..d1e0c25a 100644
--- a/app/Core/Template.php
+++ b/app/Core/Template.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Template class
diff --git a/app/Core/Tool.php b/app/Core/Tool.php
index 39e42b83..1bd43a40 100644
--- a/app/Core/Tool.php
+++ b/app/Core/Tool.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
use Pimple\Container;
@@ -44,7 +44,7 @@ class Tool
{
foreach ($namespaces as $namespace => $classes) {
foreach ($classes as $name) {
- $class = '\\'.$namespace.'\\'.$name;
+ $class = '\\Kanboard\\'.$namespace.'\\'.$name;
$container[lcfirst($name)] = function ($c) use ($class) {
return new $class($c);
};
diff --git a/app/Core/Translator.php b/app/Core/Translator.php
index e9aa1f3f..7dd67363 100644
--- a/app/Core/Translator.php
+++ b/app/Core/Translator.php
@@ -1,6 +1,6 @@
<?php
-namespace Core;
+namespace Kanboard\Core;
/**
* Translator class