blob: dbb0349aa0aa3d1974bba6b8be8d67ca9b4e5073 (
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
|
<?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];
}
}
|