mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
306 lines
9.5 KiB
HTML
306 lines
9.5 KiB
HTML
|
|
|
|
<!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">
|
|
|
|
<title>PSR Compliance — CodeIgniter4 4.0.0-beta.1 documentation</title>
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="../_static/ci-icon.ico"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../_static/css/citheme.css" type="text/css" />
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="top" title="CodeIgniter4 4.0.0-beta.1 documentation" href="../index.html"/>
|
|
<link rel="up" title="Welcome to CodeIgniter4" href="index.html"/>
|
|
<link rel="next" title="Installation" href="../installation/index.html"/>
|
|
<link rel="prev" title="Credits" href="credits.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 class="current">
|
|
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Welcome to CodeIgniter4</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="index.html">Welcome to CodeIgniter4</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="requirements.html">Server Requirements</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="credits.html">Credits</a></li>
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">PSR Compliance</a></li>
|
|
</ul>
|
|
</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>
|
|
<li class="toctree-l1"><a class="reference internal" href="../extending/index.html">Extending CodeIgniter</a></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">Welcome to CodeIgniter4</a> »</li>
|
|
|
|
<li>PSR Compliance</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="psr-compliance">
|
|
<h1>PSR Compliance<a class="headerlink" href="#psr-compliance" title="Permalink to this headline">¶</a></h1>
|
|
<p>The <a class="reference external" href="http://www.php-fig.org/">PHP-FIG</a> was created in 2009 to help make code more interoperable between frameworks
|
|
by ratifying Interfaces, style guides, and more that members were free to implement or not. While CodeIgniter is
|
|
not a member of the FIG, we are compatible with a number of their proposals. This guide is meant to list the
|
|
status of our compliance with the various accepted, and some draft, proposals.</p>
|
|
<p><strong>PSR-1: Basic Coding Standard</strong></p>
|
|
<p>This recommendation covers basic class, method, and file-naming standards. Our
|
|
<a class="reference external" href="https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/styleguide.rst">style guide</a>
|
|
meets PSR-1 and adds its own requirements on top of it.</p>
|
|
<p><strong>PSR-2: Coding Style Guide</strong></p>
|
|
<p>This PSR was fairly controversial when it first came out. CodeIgniter meets many of the recommendations within,
|
|
but does not, and will not, meet all of them.</p>
|
|
<p><strong>PSR-3: Logger Interface</strong></p>
|
|
<p>CodeIgniter’s <a class="reference internal" href="../general/logging.html"><span class="doc">Logger</span></a> implements all of the interfaces provided by this PSR.</p>
|
|
<p><strong>PSR-4: Autoloading Standard</strong></p>
|
|
<p>This PSR provides a method for organizing file and namespaces to allow for a standard method of autoloading
|
|
classes. Our <a class="reference internal" href="../concepts/autoloader.html"><span class="doc">Autoloader</span></a> meets the PSR-4 recommendations.</p>
|
|
<p><strong>PSR-6: Caching Interface</strong></p>
|
|
<p>CodeIgniter will not be trying to meet this PSR, as we believe it oversteps its needs. The newly proposed
|
|
<a class="reference external" href="https://github.com/dragoonis/fig-standards/blob/psr-simplecache/proposed/simplecache.md">SimpleCache Interfaces</a>
|
|
do look like something we would consider.</p>
|
|
<p><strong>PSR-7: HTTP Message Interface</strong></p>
|
|
<p>This PSR standardizes a way of representing the HTTP interactions. While many of the concepts became part of our
|
|
HTTP layer, CodeIgniter does not strive for compatibility with this recommendation.</p>
|
|
<p>—</p>
|
|
<p>If you find any places that we claim to meet a PSR but have failed to execute it correctly, please let us know
|
|
and we will get it fixed, or submit a pull request with the required changes.</p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="articleComments">
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="../installation/index.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="credits.html" class="btn btn-neutral" title="Credits" 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.
|
|
Last updated on Mar 09, 2019.
|
|
|
|
</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:'../',
|
|
VERSION:'4.0.0-beta.1',
|
|
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> |