DDC-1518: Method chaining in Setters of generated entity classes #2149

Closed
doctrinebot opened this Issue Dec 2, 2011 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user naitsirch:

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.

@doctrinebot

Comment created by naitsirch:

This has already been fixed

@doctrinebot

Issue was closed with resolution "Duplicate"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.3.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment