nelmio/alice — pull request #16 by everzet (2012-12-31 14:30:37+00:00)
Title: Add support for custom method calls

As we are not calling constructor automatically to initialize
objects anymore, we now need a way to call it manually with
custom arguments.

It also could be extremely useful to be able to call custom
methods (not setters) with one or many custom arguments.

This commit does exactly that. It adds support for user-defined
custom methods with custom arguments. Now, if user provides full
method name instead of field as a key, Alice will call this method
with multiple arguments, provided as array value.

Example:

App\Entity\Contact:
user1_contact:
__construct: [ @user1 ]