summaryrefslogtreecommitdiff
path: root/app/Integration
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
commiteeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch)
tree511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Integration
parent65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff)
Helpers refactoring
Diffstat (limited to 'app/Integration')
-rw-r--r--app/Integration/Base.php53
-rw-r--r--app/Integration/BitbucketWebhook.php2
-rw-r--r--app/Integration/GithubWebhook.php2
-rw-r--r--app/Integration/GitlabWebhook.php2
-rw-r--r--app/Integration/HipchatWebhook.php2
-rw-r--r--app/Integration/Jabber.php4
-rw-r--r--app/Integration/MailgunWebhook.php2
-rw-r--r--app/Integration/PostmarkWebhook.php2
-rw-r--r--app/Integration/SendgridWebhook.php2
-rw-r--r--app/Integration/SlackWebhook.php2
10 files changed, 10 insertions, 63 deletions
diff --git a/app/Integration/Base.php b/app/Integration/Base.php
deleted file mode 100644
index dbb0349a..00000000
--- a/app/Integration/Base.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-namespace Integration;
-
-use Pimple\Container;
-
-/**
- * Base class
- *
- * @package integration
- * @author Frederic Guillot
- *
- * @property \Model\ProjectActivity $projectActivity
- * @property \Model\ProjectIntegration $projectIntegration
- * @property \Model\ProjectPermission $projectPermission
- * @property \Model\Task $task
- * @property \Model\TaskFinder $taskFinder
- * @property \Model\User $user
- * @property \Model\Project $project
- */
-abstract class Base
-{
- /**
- * Container instance
- *
- * @access protected
- * @var \Pimple\Container
- */
- protected $container;
-
- /**
- * Constructor
- *
- * @access public
- * @param \Pimple\Container $container
- */
- public function __construct(Container $container)
- {
- $this->container = $container;
- }
-
- /**
- * Load automatically class from the container
- *
- * @access public
- * @param string $name
- * @return mixed
- */
- public function __get($name)
- {
- return $this->container[$name];
- }
-}
diff --git a/app/Integration/BitbucketWebhook.php b/app/Integration/BitbucketWebhook.php
index 7ff8087e..75fc1c81 100644
--- a/app/Integration/BitbucketWebhook.php
+++ b/app/Integration/BitbucketWebhook.php
@@ -11,7 +11,7 @@ use Model\Task;
* @package integration
* @author Frederic Guillot
*/
-class BitbucketWebhook extends Base
+class BitbucketWebhook extends \Core\Base
{
/**
* Events
diff --git a/app/Integration/GithubWebhook.php b/app/Integration/GithubWebhook.php
index 0070c309..d95eba78 100644
--- a/app/Integration/GithubWebhook.php
+++ b/app/Integration/GithubWebhook.php
@@ -11,7 +11,7 @@ use Model\Task;
* @package integration
* @author Frederic Guillot
*/
-class GithubWebhook extends Base
+class GithubWebhook extends \Core\Base
{
/**
* Events
diff --git a/app/Integration/GitlabWebhook.php b/app/Integration/GitlabWebhook.php
index e30a0b50..8a11f5c6 100644
--- a/app/Integration/GitlabWebhook.php
+++ b/app/Integration/GitlabWebhook.php
@@ -12,7 +12,7 @@ use Model\Task;
* @package integration
* @author Frederic Guillot
*/
-class GitlabWebhook extends Base
+class GitlabWebhook extends \Core\Base
{
/**
* Events
diff --git a/app/Integration/HipchatWebhook.php b/app/Integration/HipchatWebhook.php
index 03b85232..59190959 100644
--- a/app/Integration/HipchatWebhook.php
+++ b/app/Integration/HipchatWebhook.php
@@ -8,7 +8,7 @@ namespace Integration;
* @package integration
* @author Frederic Guillot
*/
-class HipchatWebhook extends Base
+class HipchatWebhook extends \Core\Base
{
/**
* Return true if Hipchat is enabled for this project or globally
diff --git a/app/Integration/Jabber.php b/app/Integration/Jabber.php
index d6917186..c956cc47 100644
--- a/app/Integration/Jabber.php
+++ b/app/Integration/Jabber.php
@@ -14,7 +14,7 @@ use Fabiang\Xmpp\Protocol\Presence;
* @package integration
* @author Frederic Guillot
*/
-class Jabber extends Base
+class Jabber extends \Core\Base
{
/**
* Return true if Jabber is enabled for this project or globally
@@ -82,7 +82,7 @@ class Jabber extends Base
if ($this->config->get('application_url')) {
$payload .= ' '.$this->config->get('application_url');
- $payload .= $this->helper->url('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id));
+ $payload .= $this->helper->url->to('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id));
}
$this->sendMessage($project_id, $payload);
diff --git a/app/Integration/MailgunWebhook.php b/app/Integration/MailgunWebhook.php
index 8e542513..50d96a4a 100644
--- a/app/Integration/MailgunWebhook.php
+++ b/app/Integration/MailgunWebhook.php
@@ -11,7 +11,7 @@ use Core\Tool;
* @package integration
* @author Frederic Guillot
*/
-class MailgunWebhook extends Base
+class MailgunWebhook extends \Core\Base
{
/**
* Parse incoming email
diff --git a/app/Integration/PostmarkWebhook.php b/app/Integration/PostmarkWebhook.php
index 642955df..9051e5f7 100644
--- a/app/Integration/PostmarkWebhook.php
+++ b/app/Integration/PostmarkWebhook.php
@@ -10,7 +10,7 @@ use HTML_To_Markdown;
* @package integration
* @author Frederic Guillot
*/
-class PostmarkWebhook extends Base
+class PostmarkWebhook extends \Core\Base
{
/**
* Parse incoming email
diff --git a/app/Integration/SendgridWebhook.php b/app/Integration/SendgridWebhook.php
index 142ed49f..9125f00b 100644
--- a/app/Integration/SendgridWebhook.php
+++ b/app/Integration/SendgridWebhook.php
@@ -11,7 +11,7 @@ use Core\Tool;
* @package integration
* @author Frederic Guillot
*/
-class SendgridWebhook extends Base
+class SendgridWebhook extends \Core\Base
{
/**
* Parse incoming email
diff --git a/app/Integration/SlackWebhook.php b/app/Integration/SlackWebhook.php
index b64096fb..4d2ae3a3 100644
--- a/app/Integration/SlackWebhook.php
+++ b/app/Integration/SlackWebhook.php
@@ -8,7 +8,7 @@ namespace Integration;
* @package integration
* @author Frederic Guillot
*/
-class SlackWebhook extends Base
+class SlackWebhook extends \Core\Base
{
/**
* Return true if Slack is enabled for this project or globally