.

ConverterCallback Class Reference
[Lib]

A converter that calls function given as parameter. More...

Inheritance diagram for ConverterCallback:
IConverter

List of all members.

Public Member Functions

  decode ($value, $params=false)
  encode ($value, $params=false)

Detailed Description

A converter that calls function given as parameter.

Author:
Gerd Riesselmann

Definition at line 8 of file callback.converter.php.


Member Function Documentation

ConverterCallback::decode ( value,
params = false  
)

Implements IConverter.

Definition at line 16 of file callback.converter.php.

00016                                                         {
00017                 if (is_callable($params)) {
00018                         return $params($value);
00019                 }
00020                 throw new Exception('Callback in ConverterCallback::decode not callable');
00021         }
ConverterCallback::encode ( value,
params = false  
)

Implements IConverter.

Definition at line 9 of file callback.converter.php.

00009                                                         {
00010                 if (is_callable($params)) {
00011                         return $params($value);
00012                 }
00013                 throw new Exception('Callback in ConverterCallback::encode not callable');
00014         }

The documentation for this class was generated from the following file: