Development

/plugins/sfAmfPlugin/lib/sfAmfService.php

You must first sign up to be able to contribute.

root/plugins/sfAmfPlugin/lib/sfAmfService.php

Revision 11104, 1.1 kB (checked in by thaberkern, 5 years ago)

--

Line 
1 <?php
2 /**
3  * This file is part of the sfAmfPlugin package.
4  * (c) 2008 Timo Haberkern <timo.haberkern@gmail.com>
5  *
6  * For the full copyright and license information, please view the LICENSE
7  * file that was distributed with this source code.
8  */
9
10 class sfAmfService {
11     public function __construct() {
12         $reflector = new ReflectionClass(get_class($this));
13
14         $this->methodTable = array();
15         
16         foreach ($reflector->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
17             if (!$method->isConstructor() &&
18                     !$method->isStatic() &&
19                     !$method->isAbstract() ) {
20                 $this->methodTable[$method->name] =       
21                             array (
22                                     "access" => "remote",
23                                     "description" => ""
24                                 ); 
25             }
26         }
27     }
28     
29     public function run($method_name, $arguments) {
30         $result = call_user_func_array(
31                         array($this, $method_name),
32                         $arguments
33                     );
34         $adapter_proxy = new sfAdapterDelegate();
35         return $adapter_proxy->convert($result);
36     }
37 }
38 ?>
Note: See TracBrowser for help on using the browser.