Comments (4)
In the case of redirect()
, if we want to keep the function same as before (it seems the current implementation is it), I think we have to throw an exception, instead of calling exit()
.
Catching the exception in CodeIgniter.php
and go to the end of the file. So we don't have to call exit()
and we can exit CodeIgniter safely.
I don't know another way to remove exit()
in the code now.
from codeigniter4.
I think you're right about how to handle the redirect()
method. And that provides the best reasoning to encapsulate CodeIgniter as a class, honestly.
We want to be able to provide the exit codes so we can continue to provide the responses during exits for other scripts to monitor. We can pass those exit codes in the exceptions. Additionally, different types of exceptions can be provided for the more severe log levels, allowing the system to take some automatic action when those types of errors happen.
All of that works cleanest with CI as an object. I still have other objections/concerns about some of the details in your class, though. :)
from codeigniter4.
Removed exit()
in redirect()
: #49
from codeigniter4.
So are we good close this, then? That was the main blocker, right?
from codeigniter4.
Related Issues (20)
- Bug: When Install fresh codeigniter 4 Project I am getting "does not comply with psr-4 autoloading standard" HOT 1
- Bug(OCI8): $validDSNs regex for Oracle service names should support periods HOT 1
- Bug: [QueryBuilder] select() TypeError: trim(): Argument #1 ($string) must be of type string, CodeIgniter\Database\RawSql given HOT 4
- Validation `valid_date` does not work with time HOT 2
- Bug: Auto Routing (Legacy) does not behave like legacy anymore. HOT 9
- Bug: validation level dont work as expected HOT 6
- Bug: Class 'file' not found in SYSTEMPATH\Config\Services.php on line 686. HOT 5
- Bug: `spark phpini:check` TypeError HOT 4
- Bug: ENVIRONMENT is not updated when changed via .ENV ( 4.5.3) HOT 5
- [Feat] Routing: Support to PHP Attributes HOT 4
- Bug: routes not work in ci 4.3.5 HOT 2
- Bug: debug bar content not show with daisyUI ver 4.12.10 HOT 4
- Bug: TypeError in pg_ping() HOT 7
- Add to $filters except urls like in globals HOT 1
- Bug: Module/Config/Registrar.php cause infinite loop in codeigniter4\framework\system\Autoloader\FileLocator.php on line 226
- Bug: Boot Order HOT 3
- Bug: Routing groups and in-group routes use filters that are only effective within the group. HOT 1
- [Registrar] Duplicate entries leads to duplicate config properties which leads to duplicated items in the debug toolbar. HOT 6
- DB BaseBuilder Join() - RawSql as table HOT 1
- Bug: speed bug HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter4.