2017-03-07 23:01:13 +00:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
2017-03-28 04:12:12 +00:00
|
|
|
namespace JKingWeb\Arsse\User\Internal;
|
|
|
|
use JKingWeb\Arsse\User\Driver as Iface;
|
2017-03-07 23:01:13 +00:00
|
|
|
|
|
|
|
final class Driver implements Iface {
|
|
|
|
use InternalFunctions;
|
|
|
|
|
|
|
|
protected $db;
|
|
|
|
protected $functions = [
|
|
|
|
"auth" => Iface::FUNC_INTERNAL,
|
|
|
|
"userList" => Iface::FUNC_INTERNAL,
|
|
|
|
"userExists" => Iface::FUNC_INTERNAL,
|
|
|
|
"userAdd" => Iface::FUNC_INTERNAL,
|
|
|
|
"userRemove" => Iface::FUNC_INTERNAL,
|
|
|
|
"userPasswordSet" => Iface::FUNC_INTERNAL,
|
|
|
|
"userPropertiesGet" => Iface::FUNC_INTERNAL,
|
|
|
|
"userPropertiesSet" => Iface::FUNC_INTERNAL,
|
|
|
|
"userRightsGet" => Iface::FUNC_INTERNAL,
|
|
|
|
"userRightsSet" => Iface::FUNC_INTERNAL,
|
|
|
|
];
|
|
|
|
|
|
|
|
static public function driverName(): string {
|
2017-03-28 22:50:00 +00:00
|
|
|
return Data::$l->msg("Driver.User.Internal.Name");
|
2017-03-07 23:01:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function driverFunctions(string $function = null) {
|
|
|
|
if($function===null) return $this->functions;
|
|
|
|
if(array_key_exists($function, $this->functions)) {
|
|
|
|
return $this->functions[$function];
|
|
|
|
} else {
|
|
|
|
return Iface::FUNC_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// see InternalFunctions.php for bulk of methods
|
|
|
|
}
|