File tree 1 file changed +15
-7
lines changed
1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: robincawser
5
- * Date: 10/03/2014
6
- * Time: 19:19
7
- */
8
2
9
3
namespace Rss \Provider ;
10
4
15
9
use Rss \Model \User ;
16
10
use Rss \Repo \UserRepository ;
17
11
12
+ /**
13
+ * Class UserProvider
14
+ *
15
+ * This class provides the current user of the system. If no user is defined in the cookie, a new one will be created
16
+ * and added to the database.
17
+ *
18
+ * @package Rss\Provider
19
+ */
18
20
class UserProvider
19
21
{
20
22
private $ crypto ;
21
23
private $ config ;
22
- private $ user_config ;
23
24
25
+ /**
26
+ * Creates encryption class and user repo upon instantiation
27
+ *
28
+ * @param $config Requires the config file in order to use Repository classes
29
+ */
24
30
public function __construct ($ config )
25
31
{
26
32
$ this ->config = $ config ;
@@ -29,6 +35,7 @@ public function __construct($config)
29
35
}
30
36
31
37
/**
38
+ * Get's the user of the system, whether an already existing user or a newly created user
32
39
* @return mixed|User
33
40
*/
34
41
public function getUser ()
@@ -55,6 +62,7 @@ public function getUser()
55
62
}
56
63
57
64
/**
65
+ * Creates a new user. If user already exists, it tries again!
58
66
* @return User
59
67
*/
60
68
private function createUser ()
You can’t perform that action at this time.
0 commit comments