AMFPHP, method table automation

Christophe Herreman created a very nice PHP class in order to automate the method table creation inside your AMFPHP class.
In this way, using his class, you can instead of writing every time you create a new PHP class, or just editing it, the code like:

$this->methodTable = array(
"getParkTypes" => array(
"description" => "Returns list of park types",
"access" => "remote",
"arguments" => array ("arg1")
),
"getParksList" => array(
"description" => "Shows list of parks given a park type",
"access" => "remote",
"arguments" => array ("parkType")
),
"getParkDetails" => array(
"description" => "Return details on a park give the parkname",
"access" => "remote",
"arguments" => array ("parkName")
)
);

You can just use this code:

require_once("MethodTable.php");
$this->methodTable = MethodTable::create($this);

The only problem for most of us is that this requires PHP5
Link: http://cherreman.blogspot.com/…automation.html

Share with...