Skip to content

DataBindMapper and DataBindGetter interfaces

Compare
Choose a tag to compare
@g105b g105b released this 31 Jul 08:00
· 139 commits to master since this release
c42bd61

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.