Skip to content

Commit dccb49d

Browse files
authored
Merge pull request #1629 from samsonasik/app-clean-up
"application" to "app" directory doc and comments and welcome_message clean up
2 parents d309b34 + 180fc1d commit dccb49d

38 files changed

Lines changed: 117 additions & 117 deletions

app/Config/Autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct()
3636
* to their location on the file system. These are used by the
3737
* Autoloader to locate files the first time they have been instantiated.
3838
*
39-
* The '/application' and '/system' directories are already mapped for
39+
* The '/app' and '/system' directories are already mapped for
4040
* you. You may change the name of the 'App' namespace if you wish,
4141
* but this should be done prior to creating any namespaced classes,
4242
* else you will need to modify all of those classes for this to work.

app/Config/Paths.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Holds the paths that are used by the system to
5-
* locate the main directories, application, system, etc.
5+
* locate the main directories, app, system, etc.
66
* Modifying these allows you to re-structure your application,
77
* share a system folder between multiple applications, and more.
88
*
@@ -45,7 +45,7 @@ class Paths
4545
* This variable must contain the name of your "writable" directory.
4646
* The writable directory allows you to group all directories that
4747
* need write permission to a single place that can be tucked away
48-
* for maximum security, keeping it out of the application and/or
48+
* for maximum security, keeping it out of the app and/or
4949
* system directories.
5050
*/
5151
public $writableDirectory = __DIR__ . '/../../writable';
@@ -58,7 +58,7 @@ class Paths
5858
* This variable must contain the name of your "tests" directory.
5959
* The writable directory allows you to group all directories that
6060
* need write permission to a single place that can be tucked away
61-
* for maximum security, keeping it out of the application and/or
61+
* for maximum security, keeping it out of the app and/or
6262
* system directories.
6363
*/
6464
public $testsDirectory = __DIR__ . '/../../tests';
@@ -70,7 +70,7 @@ class Paths
7070
*
7171
* This variable must contain the name of the directory that
7272
* contains the view files used by your application. By
73-
* default this is in `application/Views`. This value
73+
* default this is in `app/Views`. This value
7474
* is used when no value is provided to `Services::renderer()`.
7575
*/
7676
public $viewDirectory = __DIR__ . '/../../app/Views';

app/Views/welcome_message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@
111111

112112
<pre>
113113
<code>
114-
application/Views/welcome_message.php
114+
app/Views/welcome_message.php
115115
</code>
116116
</pre>
117117

118118
<p>The corresponding controller for this page is found at:</p>
119119

120120
<pre>
121121
<code>
122-
application/Controllers/Home.php
122+
app/Controllers/Home.php
123123
</code>
124124
</pre>
125125

user_guide_src/source/concepts/autoloader.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ beginning of the framework's execution.
2929
Configuration
3030
=============
3131

32-
Initial configuration is done in **/application/Config/Autoload.php**. This file contains two primary
32+
Initial configuration is done in **/app/Config/Autoload.php**. This file contains two primary
3333
arrays: one for the classmap, and one for PSR4-compatible namespaces.
3434

3535
Namespaces
@@ -52,7 +52,7 @@ have a trailing slash.
5252

5353
By default, the application folder is namespace to the ``App`` namespace. While you are not forced to namespace the controllers,
5454
libraries, or models in the application directory, if you do, they will be found under the ``App`` namespace.
55-
You may change this namespace by editing the **/application/Config/Constants.php** file and setting the
55+
You may change this namespace by editing the **/app/Config/Constants.php** file and setting the
5656
new namespace value under the ``APP_NAMESPACE`` setting::
5757

5858
define('APP_NAMESPACE', 'App');
@@ -80,7 +80,7 @@ Legacy Support
8080
==============
8181

8282
If neither of the above methods find the class, and the class is not namespaced, the autoloader will look in the
83-
**/application/Libraries** and **/application/Models** directories to attempt to locate the files. This provides
83+
**/app/Libraries** and **/app/Models** directories to attempt to locate the files. This provides
8484
a measure to help ease the transition from previous versions.
8585

8686
There are no configuration options for legacy support.

user_guide_src/source/extending/events.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Events are always enabled, and are available globally.
2020
Defining an Event
2121
=================
2222

23-
Most events are defined within the **application/Config/Events.php** file. You can subscribe an action to an event with
23+
Most events are defined within the **app/Config/Events.php** file. You can subscribe an action to an event with
2424
the Events class' ``on()`` method. The first parameter is the name of the event to subscribe to. The second parameter is
2525
a callable that will be run when that event is triggered::
2626

user_guide_src/source/general/caching.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ you. Once the tag is in place, your pages will begin being cached.
4545
your output, you have to manually delete your cache files.
4646

4747
.. note:: Before the cache files can be written you must set the cache
48-
engine up by editing **application/Config/Cache.php**.
48+
engine up by editing **app/Config/Cache.php**.
4949

5050
Deleting Caches
5151
===============

user_guide_src/source/general/common_functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Miscellaneous Functions
215215
:returns: TRUE if was logged succesfully or FALSE if there was a problem logging it
216216
:rtype: bool
217217

218-
Logs a message using the Log Handlers defined in **application/Config/Logger.php**.
218+
Logs a message using the Log Handlers defined in **app/Config/Logger.php**.
219219

220220
Level can be one of the following values: **emergency**, **alert**, **critical**, **error**, **warning**,
221221
**notice**, **info**, or **debug**.

user_guide_src/source/general/configuration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ are public, so you access the settings like any other property::
3535
$mailpath = $config->mailpath;
3636

3737
If no namespace is provided, it will look for the files in all available namespaces that have
38-
been defined, as well as **/application/Config/**. All of the configuration files
38+
been defined, as well as **/app/Config/**. All of the configuration files
3939
that ship with CodeIgniter are namespaced with ``Config``. Using this namespace in your
4040
application will provide the best performance since it knows exactly what directory to find the
4141
files in and doesn't have to scan several locations in the filesystem to get there.
4242

4343
You can locate the configuration files any place on your server by using a different namespace.
4444
This allows you to pull configuration files on the production server to a folder that is not in
45-
the web-accessible space at all, while keeping it under **/application** for ease of access during development.
45+
the web-accessible space at all, while keeping it under **/app** for ease of access during development.
4646

4747
Creating Configuration Files
4848
============================
4949

5050
If you need to create a new configuration file you would create a new file at your desired location,
51-
**/application/Config** by default. Then create the class and fill it with public properties that
51+
**/app/Config** by default. Then create the class and fill it with public properties that
5252
represent your settings::
5353

54-
namespace Config;
54+
namespace Config;
5555
use CodeIgniter\Config\BaseConfig;
5656

5757
class App extends BaseConfig
@@ -96,7 +96,7 @@ the environment. This will work in any environment. These variables are then ava
9696
$s3_bucket = $_ENV['S3_BUCKET'];
9797
$s3_bucket = $_SERVER['S3_BUCKET'];
9898

99-
.. note:: If you are using Apache, then the CI_ENVIRONMENT can be set at the top of
99+
.. note:: If you are using Apache, then the CI_ENVIRONMENT can be set at the top of
100100
``public/.htaccess``, which comes with a commented line to do that. Change the
101101
environment setting to the one you want to use, and uncomment that line.
102102

user_guide_src/source/general/helpers.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ in your :doc:`controller </incoming/controllers>` and
2424
:doc:`views </outgoing/views>`.
2525

2626
Helpers are typically stored in your **system/Helpers**, or
27-
**application/Helpers directory**. CodeIgniter will look first in your
28-
**application/Helpers directory**. If the directory does not exist or the
27+
**app/Helpers directory**. CodeIgniter will look first in your
28+
**app/Helpers directory**. If the directory does not exist or the
2929
specified helper is not located there CI will instead look in your
3030
global *system/Helpers/* directory.
3131

@@ -64,7 +64,7 @@ it.
6464
Loading from Non-standard Locations
6565
-----------------------------------
6666

67-
Helpers can be loaded from directories outside of **application/Helpers** and
67+
Helpers can be loaded from directories outside of **app/Helpers** and
6868
**system/Helpers**, as long as that path can be found through a namespace that
6969
has been setup within the PSR-4 section of the :doc:`Autoloader config file <../concepts/autoloader>`.
7070
You would prefix the name of the Helper with the namespace that it can be located
@@ -100,7 +100,7 @@ URI to the controller/method you wish to link to.
100100
"Extending" Helpers
101101
===================
102102

103-
To "extend" Helpers, create a file in your **application/Helpers/** folder
103+
To "extend" Helpers, create a file in your **app/Helpers/** folder
104104
with an identical name to the existing Helper.
105105

106106
If all you need to do is add some functionality to an existing helper -
@@ -114,7 +114,7 @@ your version. In this case it's better to simply "extend" the Helper.
114114
add to or or to replace the functions a Helper provides.
115115

116116
For example, to extend the native **Array Helper** you'll create a file
117-
named **application/Helpers/array_helper.php**, and add or override
117+
named **app/Helpers/array_helper.php**, and add or override
118118
functions::
119119

120120
// any_in_array() is not in the Array Helper, so it defines a new function
@@ -140,12 +140,12 @@ functions::
140140
return array_pop($array);
141141
}
142142

143-
The **helper()** method will scan through all PSR-4 namespaces defined in **application/Config/Autoload.php**
143+
The **helper()** method will scan through all PSR-4 namespaces defined in **app/Config/Autoload.php**
144144
and load in ALL matching helpers of the same name. This allows any module's helpers
145145
to be loaded, as well as any helpers you've created specifically for this application. The load order
146146
is as follows:
147147

148-
1. application/Helpers - Files loaded here are always loaded first.
148+
1. app/Helpers - Files loaded here are always loaded first.
149149
2. {namespace}/Helpers - All namespaces are looped through in the order they are defined.
150150
3. system/Helpers - The base file is loaded last
151151

user_guide_src/source/general/logging.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Configuration
3434
=============
3535

3636
You can modify which levels are actually logged, as well as assign different Loggers to handle different levels, within
37-
the ``/application/Config/Logger.php`` configuration file.
37+
the ``/app/Config/Logger.php`` configuration file.
3838

3939
The ``threshold`` value of the config file determines which levels are logged across your application. If any levels
4040
are requested to be logged by the application, but the threshold doesn't allow them to log currently, they will be
@@ -142,8 +142,8 @@ You can use any other logger that you might like as long as it extends from eith
142142
that you can easily drop in use for any PSR3-compatible logger, or create your own.
143143

144144
You must ensure that the third-party logger can be found by the system, by adding it to either
145-
the ``/application/Config/Autoload.php`` configuration file, or through another autoloader,
146-
like Composer. Next, you should modify ``/application/Config/Services.php`` to point the ``logger``
145+
the ``/app/Config/Autoload.php`` configuration file, or through another autoloader,
146+
like Composer. Next, you should modify ``/app/Config/Services.php`` to point the ``logger``
147147
alias to your new class name.
148148

149149
Now, any call that is done through the ``log_message()`` function will use your library instead.

0 commit comments

Comments
 (0)