Uses a valid PHP callback fot the value transformation.

Takes two constructor arguments: One the callback itself, two the arguments for the callback.

category Formagic
package Filter
author Florian Sonnenburg
copyright Copyright (c) 2009 Florian Sonnenburg
version $Id: Callback.php 160 2012-04-02 20:18:14Z meweasle $

 Methods

Constructor

__construct(mixed $callback, array $arguments) 

Parameters

$callback

mixed

A valid PHP callback

$arguments

array

Array of arguments for the callback

Filters the value using the PHP callback.

filter(mixed $value) : string

Parameters

$value

mixed

The value to be filtered

Returns

stringThe filtered value

 Properties

 

Array of arguments for the callback

$_arguments : Array

 

A valid PHP callback

$_callback : mixed