thekid/rfc — Issue #87: RFC 0087: Move class details information to ClassLoader
Author: thekid
Created: 2011-10-09 14:58:42+00:00
State: open

Scope of Change
====
The class details gathering mechanism will be refactored and the part of
XPClass::classDetailsFor() which gathers information will be moved to
lang.ClassLoader.

Rationale
====
Open alternative ways of class detail gathering, e.g. for classes in the
Remote API.

Functionality
====

Changes to lang.ClassLoader
----
The following method will be added:

```php

```

Changes to lang.XPClass
----
The detailsForClass() method will no call the its class' classloaders's
method getClassDetails() to retrieve the details instead of doing the
parsing / tokenizing itself.

Changes to class details internal structure
----
[DETAIL_ARGUMENTS] will no longer contain an array of lang.reflect.Argument
objects but will consist of an array with four elements:

* string name (the argument's name)
* string type (the argument's type as a string)
* bool optional (whether the argument is optional)
* string default (the argument's default value, in case it's optional)

Security considerations
====
n/a

Speed impact
====
One level more of indirection, making it slightly slower.

Dependencies
====
n/a

Related documents
====
- http://xp-framework.net/rfc/contrib/rfc0087.diff
Patch implementing this RFC

Comments
====
friebe, Sun Nov 5 15:52:35 2006
----
All 136 core unittests pass.

friebe, Fri Mar 27 14:33:08 2009
----
Implemented in a different way than suggested here, class details
are now stored in `xp::$registry`.