Skip to content

Commit 133e5ab

Browse files
committed
Add UserProvider documentation
1 parent 3a949f4 commit 133e5ab

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

lib/Rss/Provider/UserProvider.php

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
<?php
2-
/**
3-
* Created by PhpStorm.
4-
* User: robincawser
5-
* Date: 10/03/2014
6-
* Time: 19:19
7-
*/
82

93
namespace Rss\Provider;
104

@@ -15,12 +9,24 @@
159
use Rss\Model\User;
1610
use Rss\Repo\UserRepository;
1711

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+
*/
1820
class UserProvider
1921
{
2022
private $crypto;
2123
private $config;
22-
private $user_config;
2324

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+
*/
2430
public function __construct($config)
2531
{
2632
$this->config = $config;
@@ -29,6 +35,7 @@ public function __construct($config)
2935
}
3036

3137
/**
38+
* Get's the user of the system, whether an already existing user or a newly created user
3239
* @return mixed|User
3340
*/
3441
public function getUser()
@@ -55,6 +62,7 @@ public function getUser()
5562
}
5663

5764
/**
65+
* Creates a new user. If user already exists, it tries again!
5866
* @return User
5967
*/
6068
private function createUser()

0 commit comments

Comments
 (0)