1 | <?php namespace Arcanedev\LaravelTracker\Trackers; |
||
11 | abstract class AbstractTracker |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** @var \Illuminate\Contracts\Foundation\Application */ |
||
18 | private $app; |
||
19 | |||
20 | /* ------------------------------------------------------------------------------------------------ |
||
21 | | Constructor |
||
22 | | ------------------------------------------------------------------------------------------------ |
||
23 | */ |
||
24 | /** |
||
25 | * AbstractTracker constructor. |
||
26 | */ |
||
27 | 180 | public function __construct(Application $app) |
|
31 | |||
32 | /* ------------------------------------------------------------------------------------------------ |
||
33 | | Common Functions |
||
34 | | ------------------------------------------------------------------------------------------------ |
||
35 | */ |
||
36 | /** |
||
37 | * Get the config instance. |
||
38 | * |
||
39 | * @return \Illuminate\Contracts\Config\Repository |
||
40 | */ |
||
41 | 100 | protected function config() |
|
45 | |||
46 | /** |
||
47 | * Get the session store instance. |
||
48 | * |
||
49 | * @return \Illuminate\Session\Store |
||
50 | */ |
||
51 | 18 | protected function session() |
|
55 | |||
56 | /** |
||
57 | * Get the tracker config. |
||
58 | * |
||
59 | * @param string $key |
||
60 | * @param mixed|null $default |
||
61 | * |
||
62 | * @return mixed |
||
63 | */ |
||
64 | 100 | protected function getConfig($key, $default = null) |
|
68 | |||
69 | /** |
||
70 | * Make the model. |
||
71 | * |
||
72 | * @param string $name |
||
73 | * |
||
74 | * @return mixed |
||
75 | */ |
||
76 | 82 | protected function makeModel($name) |
|
82 | |||
83 | /** |
||
84 | * Make/Get the instance from the app. |
||
85 | * |
||
86 | * @param string $abstract |
||
87 | * |
||
88 | * @return mixed |
||
89 | */ |
||
90 | 106 | protected function make($abstract) |
|
94 | } |
||
95 |