@@ 33-73 (lines=41) @@ | ||
30 | * |
|
31 | * @author Piotr Olaszewski <[email protected]> |
|
32 | */ |
|
33 | class RpcEncoded extends Style |
|
34 | { |
|
35 | public function bindingStyle() |
|
36 | { |
|
37 | return 'rpc'; |
|
38 | } |
|
39 | ||
40 | public function bindingUse() |
|
41 | { |
|
42 | return 'encoded'; |
|
43 | } |
|
44 | ||
45 | public function methodInput(MethodParser $method) |
|
46 | { |
|
47 | $partElements = array(); |
|
48 | foreach ($method->parameters() as $parameter) { |
|
49 | $partElements[] = $this->_createElement($parameter); |
|
50 | } |
|
51 | return $partElements; |
|
52 | } |
|
53 | ||
54 | public function methodOutput(MethodParser $method) |
|
55 | { |
|
56 | $returnElement = $this->_createElement($method->returning()); |
|
57 | return $returnElement; |
|
58 | } |
|
59 | ||
60 | public function typeParameters(MethodParser $method) |
|
61 | { |
|
62 | $elements = array(); |
|
63 | foreach ($method->parameters() as $parameter) { |
|
64 | $elements[] = $this->_generateType($parameter); |
|
65 | } |
|
66 | return $elements; |
|
67 | } |
|
68 | ||
69 | public function typeReturning(MethodParser $method) |
|
70 | { |
|
71 | return $this->_generateType($method->returning()); |
|
72 | } |
|
73 | } |
|
74 |
@@ 33-73 (lines=41) @@ | ||
30 | * |
|
31 | * @author Piotr Olaszewski <[email protected]> |
|
32 | */ |
|
33 | class RpcLiteral extends Style |
|
34 | { |
|
35 | public function bindingStyle() |
|
36 | { |
|
37 | return 'rpc'; |
|
38 | } |
|
39 | ||
40 | public function bindingUse() |
|
41 | { |
|
42 | return 'literal'; |
|
43 | } |
|
44 | ||
45 | public function methodInput(MethodParser $method) |
|
46 | { |
|
47 | $partElements = array(); |
|
48 | foreach ($method->parameters() as $parameter) { |
|
49 | $partElements[] = $this->_createElement($parameter); |
|
50 | } |
|
51 | return $partElements; |
|
52 | } |
|
53 | ||
54 | public function methodOutput(MethodParser $method) |
|
55 | { |
|
56 | $returnElement = $this->_createElement($method->returning()); |
|
57 | return $returnElement; |
|
58 | } |
|
59 | ||
60 | public function typeParameters(MethodParser $method) |
|
61 | { |
|
62 | $elements = array(); |
|
63 | foreach ($method->parameters() as $parameter) { |
|
64 | $elements[] = $this->_generateType($parameter); |
|
65 | } |
|
66 | return $elements; |
|
67 | } |
|
68 | ||
69 | public function typeReturning(MethodParser $method) |
|
70 | { |
|
71 | return $this->_generateType($method->returning()); |
|
72 | } |
|
73 | } |
|
74 |