|
@@ 72-74 (lines=3) @@
|
| 69 |
|
if (in_array(ControllerCreateInterface::class, $classInterfaces) === true) { |
| 70 |
|
$group->post($type, $handler(CI::METHOD_CREATE), $params(CI::METHOD_CREATE)); |
| 71 |
|
} |
| 72 |
|
if (in_array(ControllerReadInterface::class, $classInterfaces) === true) { |
| 73 |
|
$group->get($type . $indexSlug, $handler(CI::METHOD_READ), $params(CI::METHOD_READ)); |
| 74 |
|
} |
| 75 |
|
if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) { |
| 76 |
|
$group->patch($type . $indexSlug, $handler(CI::METHOD_UPDATE), $params(CI::METHOD_UPDATE)); |
| 77 |
|
} |
|
@@ 75-77 (lines=3) @@
|
| 72 |
|
if (in_array(ControllerReadInterface::class, $classInterfaces) === true) { |
| 73 |
|
$group->get($type . $indexSlug, $handler(CI::METHOD_READ), $params(CI::METHOD_READ)); |
| 74 |
|
} |
| 75 |
|
if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) { |
| 76 |
|
$group->patch($type . $indexSlug, $handler(CI::METHOD_UPDATE), $params(CI::METHOD_UPDATE)); |
| 77 |
|
} |
| 78 |
|
if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 79 |
|
$group->delete($type . $indexSlug, $handler(CI::METHOD_DELETE), $params(CI::METHOD_DELETE)); |
| 80 |
|
} |
|
@@ 78-80 (lines=3) @@
|
| 75 |
|
if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) { |
| 76 |
|
$group->patch($type . $indexSlug, $handler(CI::METHOD_UPDATE), $params(CI::METHOD_UPDATE)); |
| 77 |
|
} |
| 78 |
|
if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 79 |
|
$group->delete($type . $indexSlug, $handler(CI::METHOD_DELETE), $params(CI::METHOD_DELETE)); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
return $group; |
| 83 |
|
} |
|
@@ 114-117 (lines=4) @@
|
| 111 |
|
if (in_array(ControllerReadInterface::class, $classInterfaces) === true) { |
| 112 |
|
$group->get($slugged, $handler(CI::METHOD_READ), $params(CI::METHOD_READ)); |
| 113 |
|
} |
| 114 |
|
if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) { |
| 115 |
|
$updateUri = $slugged . '/' . CI::METHOD_UPDATE; |
| 116 |
|
$group->post($updateUri, $handler(CI::METHOD_UPDATE), $params(CI::METHOD_UPDATE)); |
| 117 |
|
} |
| 118 |
|
if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 119 |
|
$deleteUri = $slugged . '/' . CI::METHOD_DELETE; |
| 120 |
|
$group->post($deleteUri, $handler(CI::METHOD_DELETE), $params(CI::METHOD_DELETE)); |
|
@@ 118-121 (lines=4) @@
|
| 115 |
|
$updateUri = $slugged . '/' . CI::METHOD_UPDATE; |
| 116 |
|
$group->post($updateUri, $handler(CI::METHOD_UPDATE), $params(CI::METHOD_UPDATE)); |
| 117 |
|
} |
| 118 |
|
if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 119 |
|
$deleteUri = $slugged . '/' . CI::METHOD_DELETE; |
| 120 |
|
$group->post($deleteUri, $handler(CI::METHOD_DELETE), $params(CI::METHOD_DELETE)); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
return $group; |
| 124 |
|
} |