Skip to content

Commit 2c483ee

Browse files
authored
Merge pull request #5434 from kenjis/fix-docs-upgrade-decoration
docs: change text decoration for installation/upgrade_*
2 parents aeee414 + 5ecf751 commit 2c483ee

10 files changed

Lines changed: 28 additions & 28 deletions

user_guide_src/source/installation/upgrade_controllers.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ What has been changed
2323
Upgrade Guide
2424
=============
2525

26-
1. First, move all controller files to the folder ``app/Controllers``.
26+
1. First, move all controller files to the folder **app/Controllers**.
2727
2. Add this line just after the opening php tag: ``namespace App\Controllers;``
2828
3. Replace ``extends CI_Controller`` with ``extends BaseController``.
2929

3030
| If you use sub-directories in your controller structure, you have to change the namespace according to that.
31-
| For example, you have a version 3 controller located in ``application/controllers/users/auth/Register.php``,
31+
| For example, you have a version 3 controller located in **application/controllers/users/auth/Register.php**,
3232
the namespace has to be ``namespace App\Controllers\Users\Auth;`` and the controller path in the version 4
33-
should look like this: ``app/Controllers/Users/Auth/Register.php``. Make sure to have the first letters of
33+
should look like this: **app/Controllers/Users/Auth/Register.php**. Make sure to have the first letters of
3434
the sub-directories as capitalized.
35-
| After that you have to insert a "use" statement below the namespace definition in order to extend the "BaseController":
35+
| After that you have to insert a ``use`` statement below the namespace definition in order to extend the ``BaseController``:
3636
``use App\Controllers\BaseController;``
3737
3838
Code Example
@@ -41,7 +41,7 @@ Code Example
4141
CodeIgniter Version 3.11
4242
------------------------
4343

44-
Path: ``application/controllers``::
44+
Path: **application/controllers**::
4545

4646
<?php
4747

@@ -56,7 +56,7 @@ Path: ``application/controllers``::
5656
CodeIgniter Version 4.x
5757
-----------------------
5858

59-
Path: ``app/Controllers``::
59+
Path: **app/Controllers**::
6060

6161
<?php
6262

user_guide_src/source/installation/upgrade_database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ What has been changed
2020

2121
Upgrade Guide
2222
=============
23-
1. Add your database credentials to ``app/Config/Database.php``. The options are pretty much the same as in CI3 only some names have changed slightly.
23+
1. Add your database credentials to **app/Config/Database.php**. The options are pretty much the same as in CI3 only some names have changed slightly.
2424
2. Everywhere you have used the database you have to replace ``$this->load->database();`` with ``$db = db_connect();``.
2525
3. If you use multiple databases use the following code to load additional databases ``$db = db_connect('group_name');``.
2626
4. Now you have to change all database queries. The most important change here is to replace ``$this->db`` with just ``$db`` and adjust the method name and ``$db``. Here are some examples:

user_guide_src/source/installation/upgrade_encryption.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ What has been changed
1919

2020
Upgrade Guide
2121
=============
22-
1. Within your configs the ``$config['encryption_key'] = 'abc123';`` moved from ``application/config/config.php`` to ``public $key = 'abc123';`` in ``app/Config/Encryption.php``.
22+
1. Within your configs the ``$config['encryption_key'] = 'abc123';`` moved from **application/config/config.php** to ``public $key = 'abc123';`` in **app/Config/Encryption.php**.
2323
2. Wherever you have used the encryption library you have to replace ``$this->load->library('encryption');`` with ``$encrypter = service('encrypter');`` and change the methods for encryption and decrypting like in the following code example.
2424

2525
Code Example

user_guide_src/source/installation/upgrade_file_upload.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ What has been changed
1818
Upgrade Guide
1919
=============
2020
In CI4 you access uploaded files with ``$file = $this->request->getFile('userfile')``. From there you can validate if the file got uploaded successfully with ``$file->isValid()``.
21-
To store the file you could use ``$path = $this->request->getFile('userfile')->store('head_img/', 'user_name.jpg');`` This will store the file in ``writable/uploads/head_img/user_name.jpg``.
21+
To store the file you could use ``$path = $this->request->getFile('userfile')->store('head_img/', 'user_name.jpg');``. This will store the file in **writable/uploads/head_img/user_name.jpg**.
2222

2323
You have to change your file uploading code to match the new methods.
2424

user_guide_src/source/installation/upgrade_localization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ What has been changed
1919

2020
Upgrade Guide
2121
=============
22-
1. Specify the default language in *Config/App.php*:::
22+
1. Specify the default language in **Config/App.php**::
2323

2424
public $defaultLocale = 'en';
2525

26-
2. Now move your language files to ``app/Language/<locale>/``.
26+
2. Now move your language files to **app/Language/<locale>**.
2727
3. After that you have to change the syntax within the language files. Below in the Code Example you will see how the language array within the file should look like.
2828
4. Remove from every file the language loader ``$this->lang->load($file, $lang);``.
2929
5. Replace the method to load the language line ``$this->lang->line('error_email_missing')`` with ``echo lang('Errors.errorEmailMissing');``.

user_guide_src/source/installation/upgrade_migrations.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Upgrade Guide
2525
=============
2626

2727
1. If your v3 project uses sequential migration names you have to change those to timestamp names.
28-
2. You have to move all migration files to the new folder ``app/Database/Migrations``.
28+
2. You have to move all migration files to the new folder **app/Database/Migrations**.
2929
3. Remove the following line ``defined('BASEPATH') OR exit('No direct script access allowed');``.
3030
4. Add this line just after the opening php tag: ``namespace App\Database\Migrations;``.
3131
5. Below the ``namespace App\Database\Migrations;`` line add this line: ``use CodeIgniter\Database\Migration;``
@@ -51,7 +51,7 @@ Code Example
5151
CodeIgniter Version 3.11
5252
------------------------
5353

54-
Path: ``application/migrations``::
54+
Path: **application/migrations**::
5555

5656
<?php
5757

@@ -90,7 +90,7 @@ Path: ``application/migrations``::
9090
CodeIgniter Version 4.x
9191
-----------------------
9292

93-
Path: ``app/Database/Migrations``::
93+
Path: **app/Database/Migrations**::
9494

9595
<?php
9696

user_guide_src/source/installation/upgrade_models.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ What has been changed
2121
Upgrade Guide
2222
=============
2323

24-
1. First, move all model files to the folder ``app/Models``.
24+
1. First, move all model files to the folder **app/Models**.
2525
2. Add this line just after the opening php tag: ``namespace App\Models;``.
2626
3. Below the ``namespace App\Models;`` line add this line: ``use CodeIgniter\Model;``.
2727
4. Replace ``extends CI_Model`` with ``extends Model``.
28-
5. Instead of CI3’s ``$this->load->model(x);``, you would now use ``$this->x = new X();``, following namespaced conventions for your component. Alternatively, you can use the ``model`` function: ``$this->x = model('X');``.
28+
5. Instead of CI3’s ``$this->load->model(x);``, you would now use ``$this->x = new X();``, following namespaced conventions for your component. Alternatively, you can use the ``model()`` function: ``$this->x = model('X');``.
2929

3030
If you use sub-directories in your model structure you have to change the namespace according to that.
31-
Example: You have a version 3 model located in ``application/models/users/user_contact.php`` the namespace has to be ``namespace App\Models\Users;`` and the model path in the version 4 should look like this: ``app/Models/Users/UserContact.php``
31+
Example: You have a version 3 model located in **application/models/users/user_contact.php** the namespace has to be ``namespace App\Models\Users;`` and the model path in the version 4 should look like this: **app/Models/Users/UserContact.php**
3232

3333
The new Model in CI4 has a lot of built-in methods. For example, the ``find($id)`` method. With this you can find data where the primary key is equal to ``$id``.
3434
Inserting data is also easier than before. In CI4 there is an ``insert($data)`` method. You can optionally make use of all those built-in methods and migrate your code to the new methods.
@@ -41,7 +41,7 @@ Code Example
4141
CodeIgniter Version 3.11
4242
------------------------
4343

44-
Path: ``application/models``::
44+
Path: **application/models**::
4545

4646
<?php
4747

@@ -60,7 +60,7 @@ Path: ``application/models``::
6060
CodeIgniter Version 4.x
6161
-----------------------
6262

63-
Path: ``app/Models``::
63+
Path: **app/Models**::
6464

6565
<?php
6666

@@ -73,4 +73,4 @@ Path: ``app/Models``::
7373
// insert() method already implemented in parent
7474
}
7575

76-
To insert data you can just directly call the ``$model->insert()`` method because this method is built-in since CI 4.
76+
To insert data you can just directly call the ``$model->insert()`` method because this method is built-in since CI4.

user_guide_src/source/installation/upgrade_security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ What has been changed
2121

2222
Upgrade Guide
2323
=============
24-
1. To enable CSRF protection in CI4 you have to enable it in ``app/Config/Filters.php``::
24+
1. To enable CSRF protection in CI4 you have to enable it in **app/Config/Filters.php**::
2525

2626
public $globals = [
2727
'before' => [

user_guide_src/source/installation/upgrade_validations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Code Example
4646

4747
CodeIgniter Version 3.11
4848
------------------------
49-
Path: ``application/views``::
49+
Path: **application/views**::
5050

5151
<html>
5252
<head>
@@ -77,7 +77,7 @@ Path: ``application/views``::
7777
</body>
7878
</html>
7979

80-
Path: ``application/controllers/``::
80+
Path: **application/controllers**::
8181

8282
<?php
8383

@@ -104,7 +104,7 @@ Path: ``application/controllers/``::
104104

105105
CodeIgniter Version 4.x
106106
-----------------------
107-
Path: ``app/Views``::
107+
Path: **app/Views**::
108108

109109
<html>
110110
<head>
@@ -135,7 +135,7 @@ Path: ``app/Views``::
135135
</body>
136136
</html>
137137

138-
Path: ``app/Controllers/``::
138+
Path: **app/Controllers**::
139139

140140
<?php
141141

user_guide_src/source/installation/upgrade_views.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ What has been changed
2222
Upgrade Guide
2323
=============
2424

25-
1. First, move all views to the folder ``app/Views``
25+
1. First, move all views to the folder **app/Views**
2626
2. Change the loading syntax of views in every script where you load views from
2727
``$this->load->view('directory_name/file_name')`` to ``echo view('directory_name/file_name');``
2828
3. (optional) You can change the echo syntax in views from ``<?php echo $title; ?>`` to ``<?= $title ?>``
@@ -33,7 +33,7 @@ Code Example
3333
CodeIgniter Version 3.11
3434
------------------------
3535

36-
Path: ``application/views``::
36+
Path: **application/views**::
3737

3838
<html>
3939
<head>
@@ -56,7 +56,7 @@ Path: ``application/views``::
5656
CodeIgniter Version 4.x
5757
-----------------------
5858

59-
Path: ``app/Views``::
59+
Path: **app/Views**::
6060

6161
<html>
6262
<head>

0 commit comments

Comments
 (0)