Skip to content

Commit

Permalink
🔨 #270 updates API
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Jul 30, 2022
1 parent 7e6e860 commit 6ce3a34
Show file tree
Hide file tree
Showing 28 changed files with 357 additions and 162 deletions.
9 changes: 5 additions & 4 deletions appexemplo_v2.0/api/api_controllers/Acesso_menuAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand Down Expand Up @@ -75,6 +75,7 @@ public static function save(Request $request, Response $response, array $args)
$controller = new \Acesso_menu;
$controller->save($vo);


$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Acesso_menu;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
15 changes: 8 additions & 7 deletions appexemplo_v2.0/api/api_controllers/Acesso_perfilAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand All @@ -31,7 +31,7 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -53,7 +53,7 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -74,7 +74,8 @@ public static function save(Request $request, Response $response, array $args)

$controller = new \Acesso_perfil;
$controller->save($vo);



$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Acesso_perfil;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand Down Expand Up @@ -74,7 +74,8 @@ public static function save(Request $request, Response $response, array $args)

$controller = new \Acesso_perfil_menu;
$controller->save($vo);



$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Acesso_perfil_menu;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand All @@ -31,7 +31,7 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -53,7 +53,7 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -74,7 +74,8 @@ public static function save(Request $request, Response $response, array $args)

$controller = new \Acesso_perfil_user;
$controller->save($vo);



$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Acesso_perfil_user;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
15 changes: 8 additions & 7 deletions appexemplo_v2.0/api/api_controllers/Acesso_userAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand All @@ -31,7 +31,7 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -53,7 +53,7 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -74,7 +74,8 @@ public static function save(Request $request, Response $response, array $args)

$controller = new \Acesso_user;
$controller->save($vo);



$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Acesso_user;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
15 changes: 8 additions & 7 deletions appexemplo_v2.0/api/api_controllers/AutoridadeAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:54
*/

namespace api_controllers;
Expand All @@ -31,7 +31,7 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -53,7 +53,7 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -74,7 +74,8 @@ public static function save(Request $request, Response $response, array $args)

$controller = new \Autoridade;
$controller->save($vo);



$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand All @@ -85,7 +86,7 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Autoridade;
$msg = $controller->delete($id);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
Expand Down
18 changes: 11 additions & 7 deletions appexemplo_v2.0/api/api_controllers/EnderecoAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:55
*/

namespace api_controllers;
Expand All @@ -31,7 +31,8 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -52,7 +53,8 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -73,7 +75,8 @@ public static function save(Request $request, Response $response, array $args)
$controller = new \Endereco;
$controller->save($vo);

$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -83,7 +86,8 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Endereco;
$msg = $controller->delete($id);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
}
18 changes: 11 additions & 7 deletions appexemplo_v2.0/api/api_controllers/MarcaAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Download SysGen: https://github.com/bjverde/sysgen
* Download Formdin Framework: https://github.com/bjverde/formDin
*
* SysGen Version: 1.9.0-alpha
* FormDin Version: 4.7.5
* SysGen Version: 1.11.0
* FormDin Version: 4.19.0
*
* System appev2 created in: 2019-09-10 09:04:46
* System appev2 created in: 2022-07-30 16:51:55
*/

namespace api_controllers;
Expand All @@ -31,7 +31,8 @@ public static function selectAll(Request $request, Response $response, array $ar
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -52,7 +53,8 @@ public static function selectById(Request $request, Response $response, array $a
$msg = array( 'qtd'=> \CountHelper::count($result)
, 'result'=>$result
);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -73,7 +75,8 @@ public static function save(Request $request, Response $response, array $args)
$controller = new \Marca;
$controller->save($vo);

$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}

Expand All @@ -83,7 +86,8 @@ public static function delete(Request $request, Response $response, array $args)
$id = $args['id'];
$controller = new \Marca;
$msg = $controller->delete($id);
$response = $response->withJson($msg);

$response = TGenericAPI::getBodyJson($msg,$response);
return $response;
}
}
Loading

0 comments on commit 6ce3a34

Please sign in to comment.