Skip to content

Commit

Permalink
Merge pull request #5614 from kenjis/fix-docs-upgrade
Browse files Browse the repository at this point in the history
docs: fix Upgrading from 3.x to 4.x
  • Loading branch information
kenjis authored Jan 25, 2022
2 parents 7c2192f + 7540051 commit 36f6936
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------

Path: **application/config**::
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------

Path: **application/controllers**::
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_emails.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_file_upload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You have to change your file uploading code to match the new methods.
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_html_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------

Path: **application/migrations**::
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can find more information to those methods :doc:`here </models/model>`.
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------

Path: **application/models**::
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_pagination.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_responses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
Path: **application/config/routes.php**::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_validations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
Path: **application/views**::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_view_parser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Upgrade Guide
Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------
::

Expand Down
9 changes: 5 additions & 4 deletions user_guide_src/source/installation/upgrade_views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@ What has been changed

- Your views look much like before, but they are invoked differently … instead of CI3’s
``$this->load->view(x);``, you can use ``echo view(x);``.
- CI4 supports view “cells”, to build your response in pieces.
- CI4 supports *View Cells* to build your response in pieces, and *View Layouts* for page layout.
- The template parser is still there, and substantially enhanced.

Upgrade Guide
=============

1. First, move all views to the folder **app/Views**
2. Change the loading syntax of views in every script where you load views from
``$this->load->view('directory_name/file_name')`` to ``echo view('directory_name/file_name');``
2. Change the loading syntax of views in every script where you load views:
- from ``$this->load->view('directory_name/file_name')`` to ``echo view('directory_name/file_name');``
- from ``$content = $this->load->view('file', $data, TRUE);`` to ``$content = view('file', $data);``
3. (optional) You can change the echo syntax in views from ``<?php echo $title; ?>`` to ``<?= $title ?>``

Code Example
============

CodeIgniter Version 3.11
CodeIgniter Version 3.x
------------------------

Path: **application/views**::
Expand Down

0 comments on commit 36f6936

Please sign in to comment.