Added a FieldView interface which must be implemented by field
renderers. The form's main view will look for FieldView implementations
to determine how to render specific field types. The only exception are
hidden fields, which are handled separately.
Added a method to the loader which can find all sub-classes /
implementations of a class / interface. The method must be called with
at least one argument (the name of the class / interface to find
subclasses / implementations of).
By default Loader::Find() will look for 'extra' classes. However, it is
possible to specify something else (e.g. 'ctrl' for controllers) as the
second argument.
Finally, by default, only packages which have already been loaded when
the method is called are considered. Passing false as the 3rd argument
will cause packages to be loaded.
Form controllers are now able to return something other than true or
null. Whatever is returned by the form controller will be passed on by
the form if it isn't a boolean.
Redirection worked fine as long as the server was using HTTP. HTTPS was
a different matter entirely. Location headers will now be sent with full
protocol, server name and port.
Added an e-mail validator to the form package. The validator is really
primitive and will only accept a small subset of email addresses, but I
needed one *now*.
It is possible to create a field validator that will make an exception
from the minimal length if the string is empty. And by "make an
exception", I don't mean "throwing one".
When this code was written, it did not include an internal URL mapper
and each page was loaded by a PHP script. The internal URL was a recent,
mostly unfinished addition.
Base URL is now supported:
* for views, when they implement the BaseURLAware interface (a base
class that does what most views will do with that is provided -
BaseURLAwareView),
* in the menu,
* in form actions,
* in boxes (for buttons, and for the contents if the inner view
implements BaseURLAware).
Added Loader::AddPath() which allows additional paths to be added to
the list in which the loader tries to find both configuration files
and components.