Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 9b4edb3

Browse files
committed
✨ add request() and response() helper functions
Signed-off-by: otengkwame <[email protected]>
1 parent bd5742a commit 9b4edb3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

framework/core/Common.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,38 @@ function _evaluated($string, $evalError = "eval()'d code")
848848

849849
// ------------------------------------------------------------------------
850850

851+
if ( ! function_exists('request'))
852+
{
853+
/**
854+
* CI Input class function
855+
*
856+
* @return CI_Input
857+
*/
858+
function request()
859+
{
860+
return get_instance()->input;
861+
}
862+
863+
}
864+
865+
// ------------------------------------------------------------------------
866+
867+
if ( ! function_exists('response'))
868+
{
869+
/**
870+
* CI Output class function
871+
*
872+
* @return CI_Output
873+
*/
874+
function response()
875+
{
876+
return get_instance()->output;
877+
}
878+
879+
}
880+
881+
// ------------------------------------------------------------------------
882+
851883
if ( ! function_exists('_stringify_attributes'))
852884
{
853885
/**

0 commit comments

Comments
 (0)