DataBindMapper and DataBindGetter interfaces
The introduction of the two new interfaces DataBindMapper and DataBindGetter allow the developer to state that a class can be used in the DomTemplate bind functions, without having to expose the data as public properties.
DataBindMapper defines a function, dataBindMap
which must return an associative array, and will be called in the bind process.
DataBindGetter does not define any functions, but instead indicates to DomTemplate that the class should have its get* functions called for any keys that are bound. For example, binding a key of id
will try to call the getId
function on the class.