Changeset 11157
- Timestamp:
- 08/26/08 11:48:15 (5 years ago)
- Files:
-
- plugins/sfAmfPlugin/README (modified) (2 diffs)
- plugins/sfAmfPlugin/lib/annotations/AmfReturnType.php (added)
- plugins/sfAmfPlugin/lib/sfAmfService.php (modified) (3 diffs)
- plugins/sfAmfPlugin/package.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfAmfPlugin/README
r11154 r11157 105 105 ------- 106 106 * Annotations for authorization 107 * Support for ArrayCollections 108 * Support for ByteArrays (i.e. for images) 109 * Added Configuration-File support for the service folder 107 110 108 111 I like to hear from you! Maybe you have an idea how to enhance the plugin. Just send me an email! … … 110 113 Changelog 111 114 -------- 112 * 1.0.0 (08-??-2008) 115 * 1.1.0 (08-??-2008) 116 * Added support for ArrayCollections 117 * Added support for ByteArrays 118 119 * 1.0.0 (08-26-2008) 113 120 * Added support for the annotations @AmfIgnore and @AmfClassMapping 114 * Added Configuration-File support for the service folder115 121 * Updated Documentation 116 122 * 0.9.4 (08-25-2008) plugins/sfAmfPlugin/lib/sfAmfService.php
r11152 r11157 20 20 // getting the annotation information for this method 21 21 $method_reflector = new ReflectionAnnotatedMethod($class_name, $method->name); 22 22 23 if ($method_reflector->hasAnnotation('AmfClassMapping')) { 23 24 $as_class_name = $method_reflector->getAnnotation('AmfClassMapping')->name; … … 27 28 if ($method_reflector->hasAnnotation('AmfIgnore')) { 28 29 $this->method_info[$method->name]['ignore'] = 1; 30 } 31 32 if ($method_reflector->hasAnnotation('AmfReturnType')) { 33 $type = $method_reflector->getAnnotation('AmfReturnType')->value; 34 35 // At the moment we can use ByteArray and ArrayCollection as 36 // types 37 if ($type == 'ArrayCollection' || $type == 'ByteArray') { 38 $this->method_info[$method->name]['return_type'] = $type; 39 } 40 else { 41 throw new Exception('AmfReturnType can only be one of the following values: '. 42 'ByteArray, ArrayCollection'); 43 } 29 44 } 30 45 } … … 63 78 } 64 79 } 80 else if (array_key_exists('return_type', $this->method_info[$method_name])) { 81 switch ($this->method_info[$method_name]['return_type']) { 82 case 'ArrayCollection': 83 return new SabreAMF_ArrayCollection($data); 84 break; 85 case 'ByteArray': 86 return new SabreAMF_ByteArray($data); 87 break; 88 } 89 } 65 90 } 66 91 plugins/sfAmfPlugin/package.xml
r11146 r11157 11 11 <active>yes</active> 12 12 </lead> 13 <date>2008-08-2 5</date>13 <date>2008-08-26</date> 14 14 <time>15:22:10</time> 15 15 <version> 16 <release> 0.9.4</release>16 <release>1.0.0</release> 17 17 <api>1.1.0</api> 18 18 </version> 19 19 <stability> 20 <release> beta</release>20 <release>stable</release> 21 21 <api>stable</api> 22 22 </stability> … … 33 33 <file role="data" name="sfAdapterBase.php"/> 34 34 </dir> <!-- /lib/adapter --> 35 <dir name="addendum"> 36 <dir name="annotations"> 37 <dir name="tests"> 38 <file role="data" name="acceptance_test.php"/> 39 <file role="data" name="all_tests.php"/> 40 <file role="data" name="annotation_parser_test.php"/> 41 <file role="data" name="annotation_test.php"/> 42 <file role="data" name="constrained_annotation_test.php"/> 43 <file role="data" name="doc_comment_test.php"/> 44 </dir> <!-- /ib/addendum/annotations/tests --> 45 <file role="data" name="annotation_parser.php"/> 46 <file role="data" name="doc_comment.php"/> 47 </dir> <!-- /ib/addendum/annotations --> 48 <file role="data" name="annotations.php"/> 49 <file role="data" name="LICENSE"/> 50 </dir> <!-- /ib/addendum --> 51 <dir name="annotations"> 52 <file role="data" name="AmfClassMapping.php"/> 53 <file role="data" name="AmfIgnore.php"/> 54 </dir> <!-- /ib/annotations --> 35 55 <dir name="SabreAMF"> 36 56 <dir name="AMF0"> … … 58 78 <file role="data" name="Const.php"/> 59 79 <file role="data" name="Deserializer.php"/> 60 <file role="data" name="DetailException.php"/> 80 <file role="data" name="DetailException.php"/> 61 81 <file role="data" name="Externalized.php"/> 62 82 <file role="data" name="InputStream.php"/> … … 104 124 <release> 105 125 <version> 126 <release>1.0.0</release> 127 <api>1.1</api> 128 </version> 129 <stability> 130 <release>stable</release> 131 <api>stable</api> 132 </stability> 133 <date>2008-08-26</date> 134 <license>MIT License</license> 135 <notes> 136 * Added support for the annotations @AmfIgnore and @AmfClassMapping 137 * Updated Documentation 138 </notes> 139 </release> 140 <release> 141 <version> 106 142 <release>0.9.4</release> 107 143 <api>1.1</api>