mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-01-03 14:32:40 +00:00
Add PHPHDoc type hints for certain class properties
This should aid autocompletion in IDEs
This commit is contained in:
parent
ac73ed0e7f
commit
15285dba1e
3 changed files with 19 additions and 1 deletions
12
lib/Data.php
12
lib/Data.php
|
@ -3,9 +3,21 @@ declare(strict_types=1);
|
||||||
namespace JKingWeb\Arsse;
|
namespace JKingWeb\Arsse;
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
|
/**
|
||||||
|
* @var Lang
|
||||||
|
*/
|
||||||
public static $lang;
|
public static $lang;
|
||||||
|
/**
|
||||||
|
* @var Conf
|
||||||
|
*/
|
||||||
public static $conf;
|
public static $conf;
|
||||||
|
/**
|
||||||
|
* @var Database
|
||||||
|
*/
|
||||||
public static $db;
|
public static $db;
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
public static $user;
|
public static $user;
|
||||||
|
|
||||||
static function load(Conf $conf) {
|
static function load(Conf $conf) {
|
||||||
|
|
|
@ -13,6 +13,10 @@ class Database {
|
||||||
const FORMAT_DATE = "Y-m-d";
|
const FORMAT_DATE = "Y-m-d";
|
||||||
const FORMAT_TIME = "h:i:s";
|
const FORMAT_TIME = "h:i:s";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Db\Driver
|
||||||
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|
|
@ -11,6 +11,9 @@ class User {
|
||||||
|
|
||||||
public $id = null;
|
public $id = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User\Driver
|
||||||
|
*/
|
||||||
protected $u;
|
protected $u;
|
||||||
protected $authz = 0;
|
protected $authz = 0;
|
||||||
protected $authzSupported = 0;
|
protected $authzSupported = 0;
|
||||||
|
@ -31,7 +34,6 @@ class User {
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$driver = Data::$conf->userDriver;
|
$driver = Data::$conf->userDriver;
|
||||||
$this->u = new $driver();
|
$this->u = new $driver();
|
||||||
$this->authzSupported = $this->u->driverFunctions("authorize");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __toString() {
|
public function __toString() {
|
||||||
|
|
Loading…
Reference in a new issue