User constructor now recieving id, login and name for faster creation.

This commit is contained in:
Alexey Skobkin 2015-10-05 03:56:16 +03:00
parent f91f106b5e
commit 23b51ea98c
1 changed files with 10 additions and 1 deletions

View File

@ -71,8 +71,17 @@ class User
private $newSubscriberEvents;
public function __construct()
/**
* @param int $id
* @param string $login
* @param string $name
*/
public function __construct($id = null, $login = null, $name = null)
{
$this->id = $id;
$this->login = $login;
$this->name = $name;
$this->subscribers = new ArrayCollection();
$this->subscriptions = new ArrayCollection();
$this->newSubscriberEvents = new ArrayCollection();