Anonymous class creationScope of ChangeA way to create anonymous instances of interfaces and abstract classes will be provided. Rationale
Throw-away classes / migration. Functionality
newinstance() declaration
&lang.Object newinstance(
string classname,
mixed[] args,
string bytes
)
Arguments:
- baseclass is the fully qualified class name of the interface to
implement or the abstract class to inherit from. Creating an anonymous instance of an interface:
$filter= &newinstance('io.collections.iterate.IterationFilter', array(&$properties), '{
Security considerations
n/a Speed impact
Slower than declaring real classes. Dependencies
This patch will increase the XP framework's minor version (4.1.0) Related documents
- http://experiments.xp-framework.net/?people,friebe,newinstance
Experiment Comments
- friebe, Mon Nov 27 12:11:33 CET 2006
I think we should increase only the minor version because this
functionality is intended for user source only and not for core
components. Because no core components use this functionality,
a major version jump seems not to make sense. | Table of contents |