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

Commit eaaf840

Browse files
committed
✨ add import() helper function as alias for include_once()
Signed-off-by: otengkwame <[email protected]>
1 parent 13eab20 commit eaaf840

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

framework/core/Common.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
* @subpackage CodeIgniter
4747
* @category Common Functions
4848
* @author EllisLab Dev Team
49+
* @author Kwame Oteng Appiah-Nti
4950
* @link https://codeigniter.com/userguide3/
5051
*/
5152

@@ -179,6 +180,22 @@ function is($key, $value = null)
179180

180181
// ------------------------------------------------------------------------
181182

183+
if ( ! function_exists('import'))
184+
{
185+
/**
186+
* Include once webby syntax
187+
*
188+
* @param string $path
189+
* @return void
190+
*/
191+
function import($path)
192+
{
193+
include_once($path);
194+
}
195+
}
196+
197+
// ------------------------------------------------------------------------
198+
182199
if ( ! function_exists('load_class'))
183200
{
184201
/**

0 commit comments

Comments
 (0)