summaryrefslogtreecommitdiff
path: root/app/Core/Base.php
blob: 7503e840dc6a990501793c2a1238c1761022af57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php

namespace Core;

use Pimple\Container;

/**
 * Base class
 *
 * @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
 */
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];
    }
}