00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00023 class PEIP_Dynamic_Adapter {
00024
00025 protected $methodMap;
00026
00027 protected $subject;
00028
00029
00036 public function __construct(ArrayAccess $methodMap, $subject){
00037 $this->methodMap = $methodMap;
00038 $this->subject = $subject;
00039 }
00040
00041
00048 public function __call($method, array $arguments){
00049 if(array_key_exists($method, $this->methodMap)){
00050 return call_user_func_array(array($this->subject, $this->methodMap[$method]), $arguments);
00051 }
00052 }
00053 }