Welcome Guest, Not a member yet? Register   Sign In
Supports stopping the controller at any position
#7

(This post was last modified: 05-08-2023, 09:29 PM by tgix.)

(05-08-2023, 09:15 PM)kenjis Wrote: I think the checkPost() method is not good.
It should return boolean.

> breaking out of a controller in CI4 is hard

Yes, because a controller must return a response.

Just thinking aloud here. Using a static function returning a response would perhaps make the code cleaner:

PHP Code:
if (true) {
  return ControllerBreak::error('Check error');

Reply


Messages In This Thread
RE: Supports stopping the controller at any position - by tgix - 05-08-2023, 09:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB