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

View file

@ -71,8 +71,17 @@ class User
private $newSubscriberEvents; 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->subscribers = new ArrayCollection();
$this->subscriptions = new ArrayCollection(); $this->subscriptions = new ArrayCollection();
$this->newSubscriberEvents = new ArrayCollection(); $this->newSubscriberEvents = new ArrayCollection();