2019-09-01 00:54:14 -07:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2019-09-30 06:49:52 -07:00
< title > Replacing Common Functions — CodeIgniter4 4.0.0-rc.2 documentation< / title >
2019-09-01 00:54:14 -07:00
< link rel = "shortcut icon" href = "../_static/ci-icon.ico" / >
< link rel = "stylesheet" href = "../_static/css/citheme.css" type = "text/css" / >
2019-09-30 06:49:52 -07:00
< link rel = "top" title = "CodeIgniter4 4.0.0-rc.2 documentation" href = "../index.html" / >
2019-09-01 00:54:14 -07:00
< link rel = "up" title = "Extending CodeIgniter" href = "index.html" / >
< link rel = "next" title = "Events" href = "events.html" / >
< link rel = "prev" title = "Creating Core System Classes" href = "core_classes.html" / >
< script src = "../_static/js/modernizr.min.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "../index.html" class = "icon icon-home" > CodeIgniter4
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../intro/index.html" > Welcome to CodeIgniter4< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../installation/index.html" > Installation< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../tutorial/index.html" > Tutorial< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../concepts/index.html" > CodeIgniter4 Overview< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../general/index.html" > General Topics< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../incoming/index.html" > Controllers and Routing< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../outgoing/index.html" > Building Responses< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../database/index.html" > Working With Databases< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../models/index.html" > Modeling Data< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../dbmgmt/index.html" > Managing Databases< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../libraries/index.html" > Library Reference< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../helpers/index.html" > Helpers< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../testing/index.html" > Testing< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../cli/index.html" > Command Line Usage< / a > < / li >
< / ul >
< ul class = "current" >
< li class = "toctree-l1 current" > < a class = "reference internal" href = "index.html" > Extending CodeIgniter< / a > < ul class = "current" >
< li class = "toctree-l2" > < a class = "reference internal" href = "core_classes.html" > Creating Core System Classes< / a > < / li >
< li class = "toctree-l2 current" > < a class = "current reference internal" href = "#" > Replacing Common Functions< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "events.html" > Events< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "basecontroller.html" > Extending the Controller< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "contributing.html" > Contributing to CodeIgniter< / a > < / li >
< / ul >
< / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../license.html" > The MIT License (MIT)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../changelogs/index.html" > Change Logs< / a > < / li >
< / ul >
< / div >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "../index.html" > CodeIgniter4< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "../index.html" > Docs< / a > » < / li >
< li > < a href = "index.html" > Extending CodeIgniter< / a > » < / li >
< li > Replacing Common Functions< / li >
< li class = "wy-breadcrumbs-aside" >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "replacing-common-functions" >
< h1 > Replacing Common Functions< a class = "headerlink" href = "#replacing-common-functions" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > There are quite a few functions necessary to CodeIgniter that need to be loaded early for use in the core classes and
thus cannot be placed into a helper. While most users will never have any need to do this, but the option to replace
these functions does exist for those who would like to significantly alter the CodeIgniter core. In the < code class = "docutils literal" > < span class = "pre" > App\< / span > < / code >
directory there is a file < code class = "docutils literal" > < span class = "pre" > Common.php< / span > < / code > , and any functions defined in there will take precedence over the versions
found in < code class = "docutils literal" > < span class = "pre" > system/Common.php< / span > < / code > . This is also an opportunity to create globally-available functions you intend to
use throughout the framework.< / p >
< div class = "admonition note" >
< p class = "first admonition-title" > Note< / p >
< p class = "last" > Messing with a core system class has a lot of implications, so make sure you know what you are doing before
attempting it.< / p >
< / div >
< / div >
< / div >
< div class = "articleComments" >
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "events.html" class = "btn btn-neutral float-right" title = "Events" accesskey = "n" rel = "next" > Next < span class = "fa fa-arrow-circle-right" > < / span > < / a >
< a href = "core_classes.html" class = "btn btn-neutral" title = "Creating Core System Classes" accesskey = "p" rel = "prev" > < span class = "fa fa-arrow-circle-left" > < / span > Previous< / a >
< / div >
< hr / >
< div role = "contentinfo" >
< p >
© Copyright 2014-2019 British Columbia Institute of Technology.
2019-10-12 02:05:42 -07:00
Last updated on Oct 12, 2019.
2019-09-01 00:54:14 -07:00
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
2019-09-30 06:49:52 -07:00
VERSION:'4.0.0-rc.2',
2019-09-01 00:54:14 -07:00
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false,
SOURCELINK_SUFFIX: ''
};
< / script >
< script type = "text/javascript" src = "../_static/jquery.js" > < / script >
< script type = "text/javascript" src = "../_static/underscore.js" > < / script >
< script type = "text/javascript" src = "../_static/doctools.js" > < / script >
< script type = "text/javascript" src = "../_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >