Skip to content

Commit

Permalink
Added app/Common.php
Browse files Browse the repository at this point in the history
A commit that will hopefully help with this topic: #2101. This is a re-submit due to lack of GPG signing in the previous PR: #2105
  • Loading branch information
jason-napolitano authored Jul 28, 2019
1 parent e1acfb9 commit 1abccce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/Common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/**
* Te goal of this file is to allow developers a location
* where they can overwrite core procedural functions and
* replace them with their own. This file is loaded during
* the bootstrap process and is called during the frameworks
* execution.
*
* This can be looked at as a `master helper` file that is
* loaded early on, and may also contain additional functions
* that you'd like to use throughout your entire application
*
* @link: https://codeigniter4.github.io/CodeIgniter4/
*/
7 changes: 7 additions & 0 deletions system/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@
require_once APPPATH . 'Config/Constants.php';
}

// Let's see if an app/Common.php file exists
if ( file_exists(APPPATH . 'Common.php')) {
// If it does, let's require it
require_once APPPATH . 'Common.php';
}

// Require system/Common.php
require_once SYSTEMPATH . 'Common.php';

/*
Expand Down

0 comments on commit 1abccce

Please sign in to comment.