mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Account extension
This commit is contained in:
parent
174d597682
commit
111494c1cc
|
|
@ -159,6 +159,7 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->createdAt = new \DateTime('now');
|
$this->createdAt = new \DateTime('now');
|
||||||
|
$this->lastActive = new \DateTime('now');
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->l11n = new NullLocalization();
|
$this->l11n = new NullLocalization();
|
||||||
}
|
}
|
||||||
|
|
@ -204,6 +205,19 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
$this->l11n = $l11n;
|
$this->l11n = $l11n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function getName() : string
|
||||||
|
{
|
||||||
|
return $this->login;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name1.
|
* Get name1.
|
||||||
*
|
*
|
||||||
|
|
@ -312,6 +326,21 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
return $this->createdAt ?? new \DateTime('NOW');
|
return $this->createdAt ?? new \DateTime('NOW');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name.
|
||||||
|
*
|
||||||
|
* @param string $name Name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function setName(string $name) /* : void */
|
||||||
|
{
|
||||||
|
$this->login = $name;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set name1.
|
* Set name1.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user