Extensions Wiki » Extensions » Velocity Module

Changes for document Velocity Module

Last modified by Marius Dumitru Florea on 2012/05/21 13:14
From version 14.1
edited by Marius Dumitru Florea
on 2012/05/21 13:07
To version 15.1
edited by Marius Dumitru Florea
on 2012/05/21 13:12
Change comment: There is no comment for this version

Object changes

Object number 0 of type ExtensionCode.ExtensionClass modified

Description
... ... @@ -190,7 +190,7 @@
190 190
191 191 == Method Arguments Uberspector ==
192 192
193 -An uberspector that tries to convert method arguments to formal parameter types when the passed arguments don't match the method signature. In other words, it looks for a method matching the passed arguments and if none is found then it tries the convert the arguments to match the available method signatures (the available methods with the same name and the same number of parameters but with different parameter types). E.g.:
193 +A chainable uberspector that tries to convert method arguments to formal parameter types when the passed arguments don't match the method signature. In other words, it looks for a method matching the passed arguments and if none is found then it tries the convert the arguments to match the available method signatures (the available methods with the same name and the same number of parameters but with different parameter types). E.g.:
194 194
195 195 {{code}}
196 196 $obj.someMethod('VALUE')
... ... @@ -198,3 +198,5 @@
198 198 obj.someMethod(SomeEnum.VALUE)
199 199 // if obj has a method with signature someMethod(SomeEnum) and not someMethod(String)
200 200 {{/code}}
201 +
202 +But this is not limited to enums. The conversion is done using the [[Properties Module]] which means you can create and register custom converters for data types specific to your application domain.

Download XWiki