Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Tools
-
Security Level: All
-
Labels:None
-
Environment:Symfony2
Description
Hi.
It would be nice if the set-methods of the generated entity classes would return the entity instance itself, so that method chaining is possible.
Example:
$user = new User();
$user->setUsername()
->setFirstname()
->setEmail();
In PHP 5.4 we can do even more nicer:
$user = new User()
->setUsername()
->setFirstname()
->setEmail();
If this is not wanted by everyone, the console tool could get a new argument to define if method chaining should be used or not.
Implementation of this improvement would be very nice. Thanks.