1 | <?php |
||
32 | class UserProviderFromConfig implements UserProviderInterface |
||
33 | { |
||
34 | /** |
||
35 | * The config source to use. |
||
36 | * |
||
37 | * @var SourceInterface |
||
38 | */ |
||
39 | private $configSource; |
||
40 | |||
41 | /** |
||
42 | * Create a new instance. |
||
43 | * |
||
44 | * @param SourceInterface $config The config source to read the user data from. |
||
45 | */ |
||
46 | public function __construct(SourceInterface $config) |
||
50 | |||
51 | /** |
||
52 | * {@inheritDoc} |
||
53 | * |
||
54 | * @throws UsernameNotFoundException When the user is not contained. |
||
55 | */ |
||
56 | public function loadUserByUsername($username) |
||
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | * |
||
70 | * @throws UnsupportedUserException For invalid user types. |
||
71 | */ |
||
72 | public function refreshUser(UserInterface $user) |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function supportsClass($class) |
||
88 | |||
89 | /** |
||
90 | * Add/update the passed credentials in the database. |
||
91 | * |
||
92 | * @param UserInformation $user The user to add. |
||
93 | * |
||
94 | * @return UserProviderFromConfig |
||
95 | */ |
||
96 | public function addUser($user) |
||
102 | |||
103 | /** |
||
104 | * Add the passed credentials in the database. |
||
105 | * |
||
106 | * @param string|UserInformation $user The username to remove. |
||
107 | * |
||
108 | * @return UserProviderFromConfig |
||
109 | */ |
||
110 | public function removeUser($user) |
||
118 | } |
||
119 |