From 23b51ea98ca6260cb83151a660620eb9e1095302 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 5 Oct 2015 03:56:16 +0300 Subject: [PATCH] User constructor now recieving id, login and name for faster creation. --- src/Skobkin/Bundle/PointToolsBundle/Entity/User.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php index 2b4dbd5..038dee0 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/User.php @@ -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();