1 | <?php |
||
53 | class Authentication extends AbstractOptions |
||
54 | { |
||
55 | /** |
||
56 | * A valid object implementing ObjectManager interface |
||
57 | * |
||
58 | * @var string | ObjectManager |
||
59 | */ |
||
60 | protected $objectManager; |
||
61 | |||
62 | /** |
||
63 | * A valid object implementing ObjectRepository interface (or ObjectManager/identityClass) |
||
64 | * |
||
65 | * @var ObjectRepository |
||
66 | */ |
||
67 | protected $objectRepository; |
||
68 | |||
69 | /** |
||
70 | * Entity's class name |
||
71 | * |
||
72 | * @var string |
||
73 | */ |
||
74 | protected $identityClass; |
||
75 | |||
76 | /** |
||
77 | * Property to use for the identity |
||
78 | * |
||
79 | * @var string |
||
80 | */ |
||
81 | protected $identityProperty; |
||
82 | |||
83 | /** |
||
84 | * Property to use for the credential |
||
85 | * |
||
86 | * @var string |
||
87 | */ |
||
88 | protected $credentialProperty; |
||
89 | |||
90 | /** |
||
91 | * Callable function to check if a credential is valid |
||
92 | * |
||
93 | * @var mixed |
||
94 | */ |
||
95 | protected $credentialCallable; |
||
96 | |||
97 | /** |
||
98 | * If an objectManager is not supplied, this metadata will be used |
||
99 | * by DoctrineModule/Authentication/Storage/ObjectRepository |
||
100 | * |
||
101 | * @var ClassMetadata |
||
102 | */ |
||
103 | protected $classMetadata; |
||
104 | |||
105 | /** |
||
106 | * When using this options class to create a DoctrineModule/Authentication/Storage/ObjectRepository |
||
107 | * this is the storage instance that the object key will be stored in. |
||
108 | * |
||
109 | * When using this options class to create an AuthenticationService with and |
||
110 | * the option storeOnlyKeys == false, this is the storage instance that the whole |
||
111 | * object will be stored in. |
||
112 | * |
||
113 | * @var StorageInterface|string; |
||
114 | */ |
||
115 | protected $storage = 'DoctrineModule\Authentication\Storage\Session'; |
||
116 | |||
117 | /** |
||
118 | * @param string | ObjectManager $objectManager |
||
119 | */ |
||
120 | 7 | public function setObjectManager($objectManager) : Authentication |
|
126 | |||
127 | /** |
||
128 | * Causes issue with unit test StorageFactoryTest::testCanInstantiateStorageFromServiceLocator |
||
129 | * when return type is specified |
||
130 | * : ObjectManager |
||
131 | * |
||
132 | * @return mixed |
||
133 | */ |
||
134 | 4 | public function getObjectManager() |
|
138 | |||
139 | 6 | public function setObjectRepository(ObjectRepository $objectRepository) : Authentication |
|
145 | |||
146 | 7 | public function getObjectRepository() : ObjectRepository |
|
154 | |||
155 | 7 | public function setIdentityClass(string $identityClass) : Authentication |
|
161 | |||
162 | public function getIdentityClass() : string |
||
166 | |||
167 | /** |
||
168 | * @throws Exception\InvalidArgumentException |
||
169 | */ |
||
170 | 10 | public function setIdentityProperty(string $identityProperty) : Authentication |
|
182 | |||
183 | 6 | public function getIdentityProperty() : string |
|
187 | |||
188 | /** |
||
189 | * @throws Exception\InvalidArgumentException |
||
190 | */ |
||
191 | 10 | public function setCredentialProperty(string $credentialProperty) : Authentication |
|
203 | |||
204 | 6 | public function getCredentialProperty() : string |
|
208 | |||
209 | /** |
||
210 | * @param mixed $credentialCallable |
||
211 | * |
||
212 | * @throws Exception\InvalidArgumentException |
||
213 | */ |
||
214 | 2 | public function setCredentialCallable($credentialCallable) : Authentication |
|
229 | |||
230 | /** |
||
231 | * @return mixed |
||
232 | */ |
||
233 | 4 | public function getCredentialCallable() |
|
237 | |||
238 | 1 | public function getClassMetadata() : ClassMetadata |
|
246 | |||
247 | 1 | public function setClassMetadata(ClassMetadata $classMetadata) : void |
|
251 | |||
252 | /** |
||
253 | * @return StorageInterface|string |
||
254 | */ |
||
255 | 4 | public function getStorage() |
|
259 | |||
260 | /** |
||
261 | * @param StorageInterface|string $storage |
||
262 | */ |
||
263 | 4 | public function setStorage($storage) : void |
|
267 | } |
||
268 | |||
271 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.