Helpers refactoring

This commit is contained in:
Frederic Guillot
2015-05-24 16:02:25 -04:00
parent 65e9e5d1be
commit eeac2329ba
239 changed files with 2441 additions and 2337 deletions

View File

@@ -6,7 +6,7 @@ use Core\Request;
use Event\AuthEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class AuthSubscriber extends Base implements EventSubscriberInterface
class AuthSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -1,66 +0,0 @@
<?php
namespace Subscriber;
use Pimple\Container;
/**
* Base subscriber class
*
* @package subscriber
* @author Frederic Guillot
*
* @property \Integration\SlackWebhook $slackWebhook
* @property \Integration\HipchatWebhook $hipchatWebhook
* @property \Model\Board $board
* @property \Model\Config $config
* @property \Model\Comment $comment
* @property \Model\LastLogin $lastLogin
* @property \Model\Notification $notification
* @property \Model\Project $project
* @property \Model\ProjectPermission $projectPermission
* @property \Model\ProjectActivity $projectActivity
* @property \Model\ProjectAnalytic $projectAnalytic
* @property \Model\ProjectDailySummary $projectDailySummary
* @property \Model\Subtask $subtask
* @property \Model\Task $task
* @property \Model\TaskDuplication $taskDuplication
* @property \Model\TaskExport $taskExport
* @property \Model\TaskFinder $taskFinder
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
* @property \Model\UserSession $userSession
* @property \Model\Webhook $webhook
*/
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 models
*
* @access public
* @param string $name Model name
* @return mixed
*/
public function __get($name)
{
return $this->container[$name];
}
}

View File

@@ -4,7 +4,7 @@ namespace Subscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class BootstrapSubscriber extends Base implements EventSubscriberInterface
class BootstrapSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -9,7 +9,7 @@ use Model\Subtask;
use Model\File;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class NotificationSubscriber extends Base implements EventSubscriberInterface
class NotificationSubscriber extends \Core\Base implements EventSubscriberInterface
{
private $templates = array(
Task::EVENT_CREATE => 'task_creation',

View File

@@ -8,7 +8,7 @@ use Model\Comment;
use Model\Subtask;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
class ProjectActivitySubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Event\TaskEvent;
use Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProjectDailySummarySubscriber extends Base implements EventSubscriberInterface
class ProjectDailySummarySubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Event\GenericEvent;
use Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProjectModificationDateSubscriber extends Base implements EventSubscriberInterface
class ProjectModificationDateSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Event\TaskEvent;
use Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class RecurringTaskSubscriber extends Base implements EventSubscriberInterface
class RecurringTaskSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Model\Subtask;
use Event\SubtaskEvent;
class SubtaskTimesheetSubscriber extends Base implements EventSubscriberInterface
class SubtaskTimesheetSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Event\TaskEvent;
use Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class TaskMovedDateSubscriber extends Base implements EventSubscriberInterface
class TaskMovedDateSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -6,7 +6,7 @@ use Event\TaskEvent;
use Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class TransitionSubscriber extends Base implements EventSubscriberInterface
class TransitionSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{

View File

@@ -11,7 +11,7 @@ use Model\File;
use Model\Subtask;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class WebhookSubscriber extends Base implements EventSubscriberInterface
class WebhookSubscriber extends \Core\Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{