Auth\User: implement array access interface

This commit is contained in:
Benjamin Renard 2024-09-13 18:26:23 +02:00
parent df4cc74fea
commit e2dca482b3
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -108,6 +108,14 @@ class User {
} }
} }
/**
* ArrayAccess interface
*/
public function offsetExists($offset) { return self :: __isset($offset); }
public function offsetGet($offset){ return self :: __get($offset); }
public function offsetSet($offset, $value) { self :: __set($offset, $value); }
public function offsetUnset($offset) { self :: __set($offset, null); }
/** /**
* Check user password * Check user password
* @param string $password * @param string $password