1 | <?php namespace Modules\Core\Console\Installers\Scripts\UserProviders; |
||
10 | abstract class ProviderInstaller implements SetupScript |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $driver; |
||
16 | |||
17 | /** |
||
18 | * @var Command |
||
19 | */ |
||
20 | protected $command; |
||
21 | |||
22 | /** |
||
23 | * @var Filesystem |
||
24 | */ |
||
25 | protected $finder; |
||
26 | |||
27 | /** |
||
28 | * @var Composer |
||
29 | */ |
||
30 | protected $composer; |
||
31 | |||
32 | /** |
||
33 | * @var Application |
||
34 | */ |
||
35 | protected $application; |
||
36 | |||
37 | /** |
||
38 | * @param Filesystem $finder |
||
39 | * @param Composer $composer |
||
40 | * @param Application $application |
||
41 | */ |
||
42 | public function __construct(Filesystem $finder, Composer $composer, Application $application) |
||
49 | |||
50 | /** |
||
51 | * Fire the install script |
||
52 | * @param Command $command |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function fire(Command $command) |
||
82 | |||
83 | /** |
||
84 | * @return mixed |
||
85 | */ |
||
86 | abstract public function composer(); |
||
87 | |||
88 | /** |
||
89 | * Check if the user driver is correctly registered. |
||
90 | * @return bool |
||
91 | */ |
||
92 | abstract public function checkIsInstalled(); |
||
93 | |||
94 | /** |
||
95 | * @return mixed |
||
96 | */ |
||
97 | abstract public function publish(); |
||
98 | |||
99 | /** |
||
100 | * @return mixed |
||
101 | */ |
||
102 | abstract public function migrate(); |
||
103 | |||
104 | /** |
||
105 | * @return mixed |
||
106 | */ |
||
107 | abstract public function seed(); |
||
108 | |||
109 | /** |
||
110 | * @return mixed |
||
111 | */ |
||
112 | abstract public function configure(); |
||
113 | |||
114 | /** |
||
115 | * @param $password |
||
116 | * @return mixed |
||
117 | */ |
||
118 | abstract public function getHashedPassword($password); |
||
119 | |||
120 | /** |
||
121 | * @param $command |
||
122 | * @return mixed |
||
123 | */ |
||
124 | private function migrateUserModule($command) |
||
132 | |||
133 | /** |
||
134 | * @param $search |
||
135 | * @param $Driver |
||
136 | */ |
||
137 | protected function replaceCartalystUserModelConfiguration($search, $Driver) |
||
149 | |||
150 | /** |
||
151 | * Set the correct repository binding on the fly for the current request |
||
152 | * |
||
153 | * @param $driver |
||
154 | */ |
||
155 | protected function bindUserRepositoryOnTheFly($driver) |
||
170 | |||
171 | /** |
||
172 | * Create a first admin user |
||
173 | */ |
||
174 | protected function createFirstUser() |
||
190 | |||
191 | /** |
||
192 | * @return string |
||
193 | */ |
||
194 | private function askForFirstName() |
||
205 | |||
206 | /** |
||
207 | * @return string |
||
208 | */ |
||
209 | private function askForLastName() |
||
220 | |||
221 | /** |
||
222 | * @return string |
||
223 | */ |
||
224 | private function askForEmail() |
||
235 | |||
236 | /** |
||
237 | * @return string |
||
238 | */ |
||
239 | private function askForPassword() |
||
251 | |||
252 | /** |
||
253 | * @return string |
||
254 | */ |
||
255 | private function askForFirstPassword() |
||
266 | |||
267 | /** |
||
268 | * @return string |
||
269 | */ |
||
270 | private function askForPasswordConfirmation() |
||
281 | } |
||
282 |