|
Revision 11104, 1.1 kB
(checked in by thaberkern, 5 years ago)
|
--
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 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 |
?> |
|---|