@@ -21,7 +21,7 @@ public function __construct(Router $router, Responder $responder, array $propert
2121 $ this ->utils = new RequestUtils ($ reflection );
2222 }
2323
24- private function callHandler ($ handler , $ record , String $ operation , ReflectedTable $ table ) /*: object */
24+ private function callHandler ($ record , String $ operation , ReflectedTable $ table ) /*: object */
2525 {
2626 $ context = (array ) $ record ;
2727 $ columnName = $ this ->getProperty ('column ' , '' );
@@ -43,18 +43,15 @@ public function handle(Request $request): Response
4343 if ($ this ->reflection ->hasTable ($ tableName )) {
4444 $ record = $ request ->getBody ();
4545 if ($ record !== null ) {
46- $ handler = $ this ->getProperty ('handler ' , '' );
47- if ($ handler !== '' ) {
48- $ table = $ this ->reflection ->getTable ($ tableName );
49- if (is_array ($ record )) {
50- foreach ($ record as &$ r ) {
51- $ r = $ this ->callHandler ($ handler , $ r , $ operation , $ table );
52- }
53- } else {
54- $ record = $ this ->callHandler ($ handler , $ record , $ operation , $ table );
46+ $ table = $ this ->reflection ->getTable ($ tableName );
47+ if (is_array ($ record )) {
48+ foreach ($ record as &$ r ) {
49+ $ r = $ this ->callHandler ($ r , $ operation , $ table );
5550 }
56- $ request ->setBody ($ record );
51+ } else {
52+ $ record = $ this ->callHandler ($ record , $ operation , $ table );
5753 }
54+ $ request ->setBody ($ record );
5855 }
5956 }
6057 }
0 commit comments