From cc5de8f7626d3beec1c72fe2c9bd73ae0e5b670e Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Mon, 26 Oct 2026 18:34:01 +0800 Subject: [PATCH 1/2] docs: convert the remaining user guide tables to pipe-table-friendly RST --- .../source/database/configuration.rst | 36 +++++----- .../installation/upgrade_migrations.rst | 2 +- .../source/libraries/validation.rst | 70 +++++++++---------- user_guide_src/source/models/model.rst | 7 +- .../source/outgoing/view_parser.rst | 57 +++++++-------- 5 files changed, 88 insertions(+), 84 deletions(-) diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 3d523bcbf3d9..1a8c06cc59d5 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -148,9 +148,6 @@ Description of Values **username** The username used to connect to the database. (``SQLite3`` does not use this.) **password** The password used to connect to the database. (``SQLite3`` does not use this.) **database** The name of the database you want to connect to. - - .. note:: CodeIgniter doesn't support dots (``.``) in the table and column names. - Since v4.5.0, database names with dots are supported. **DBDriver** The database driver name. The case must match the driver name. You can set a fully qualified classname to use your custom driver. Supported drivers: ``MySQLi``, ``Postgre``, ``SQLite3``, ``SQLSRV``, and ``OCI8``. @@ -173,28 +170,35 @@ Description of Values strict SQL while developing an application. **port** The database port number - Empty string ``''`` for default port (or dynamic port with ``SQLSRV``). **foreignKeys** (``SQLite3`` only) true/false (boolean) - Whether to enable Foreign Key constraint. - - .. important:: SQLite3 Foreign Key constraint is disabled by default. - See `SQLite documentation `_. - To enforce Foreign Key constraint, set this config item to true. **busyTimeout** (``SQLite3`` only) milliseconds (int) - Sleeps for a specified amount of time when a table is locked. **synchronous** (``SQLite3`` only) flag (int) - How strict SQLite will be at flushing to disk during transactions. Use `null` to stay with the default setting. This can be used since v4.6.0. **numberNative** (``MySQLi`` only) true/false (boolean) - Whether to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE. **foundRows** (``MySQLi`` only) true/false (boolean) - Whether to enable MYSQLI_CLIENT_FOUND_ROWS. -**dateFormat** The default date/time formats as PHP's `DateTime format`_. - * ``date`` - date format - * ``datetime`` - date and time format - * ``datetime-ms`` - date and time with millisecond format - * ``datetime-us`` - date and time with microsecond format - * ``time`` - time format - This can be used since v4.5.0, and you can get the value, e.g., ``$db->dateFormat['datetime']``. - Currently, the database drivers do not use these values directly, - but :ref:`Model ` uses them. +**dateFormat** The default date/time formats as PHP's `DateTime format`_, with the keys listed below the table. ================ =========================================================================================================== .. _DateTime format: https://www.php.net/manual/en/datetime.format.php +.. note:: CodeIgniter doesn't support dots (``.``) in the table and column names. + Since v4.5.0, database names with dots are supported. + +.. important:: SQLite3 Foreign Key constraint is disabled by default. + See `SQLite documentation `_. + To enforce Foreign Key constraint, set **foreignKeys** to true. + +The **dateFormat** array has the following keys: + +* ``date`` - date format +* ``datetime`` - date and time format +* ``datetime-ms`` - date and time with millisecond format +* ``datetime-us`` - date and time with microsecond format +* ``time`` - time format + +This can be used since v4.5.0, and you can get the value, e.g., ``$db->dateFormat['datetime']``. +Currently, the database drivers do not use these values directly, +but :ref:`Model ` uses them. + .. note:: Depending on what database driver you are using (``MySQLi``, ``Postgre``, etc.) not all values will be needed. For example, when using ``SQLite3`` you will not need to supply a username or password, and the database name diff --git a/user_guide_src/source/installation/upgrade_migrations.rst b/user_guide_src/source/installation/upgrade_migrations.rst index 0936c48ad400..a506e58db647 100644 --- a/user_guide_src/source/installation/upgrade_migrations.rst +++ b/user_guide_src/source/installation/upgrade_migrations.rst @@ -70,7 +70,7 @@ Search & Replace You can use to following table to search & replace your old CI3 files. +------------------------------+----------------------------+ -| Search | Replace | +| Search | Replace | +==============================+============================+ | extends CI_Migration | extends Migration | +------------------------------+----------------------------+ diff --git a/user_guide_src/source/libraries/validation.rst b/user_guide_src/source/libraries/validation.rst index 399c84fa9c5b..d92d8048f533 100644 --- a/user_guide_src/source/libraries/validation.rst +++ b/user_guide_src/source/libraries/validation.rst @@ -1082,41 +1082,41 @@ See also :ref:`file-upload-form-tutorial`. ======================= ========== ============================================= =================================================== Rule Parameter Description Example ======================= ========== ============================================= =================================================== -uploaded Yes Fails if the name of the parameter does not ``uploaded[field_name]`` - match the name of any uploaded files. - If you want the file upload to be optional - (not required), do not define this rule. - -max_size Yes Fails if the uploaded file is larger ``max_size[field_name,2048]`` - than the second parameter - in kilobytes (kb). Or if the file - is larger than allowed maximum size declared - in php.ini config file - - ``upload_max_filesize`` directive. -max_dims Yes Fails if the maximum width and height of an ``max_dims[field_name,300,150]`` - uploaded image exceed values. The first - parameter is the field name. The second is - the width, and the third is the height. Will - also fail if the file cannot be determined - to be an image or the upload failed with an - error other than ``UPLOAD_ERR_NO_FILE``. -min_dims Yes Fails if the minimum width and height of an ``min_dims[field_name,300,150]`` - uploaded image not meet values. The first - parameter is the field name. The second is - the width, and the third is the height. Will - also fail if the file cannot be determined - to be an image or the upload failed with an - error other than ``UPLOAD_ERR_NO_FILE``. - (This rule was added in - v4.6.0.) -mime_in Yes Fails if the file's mime type is not one ``mime_in[field_name,image/png,image/jpeg]`` - listed in the parameters. -ext_in Yes Fails if the client filename's extension is ``ext_in[field_name,png,jpg,gif]`` - not one listed in the parameters, or if the - detected MIME type does not match the MIME - types associated with the extension. -is_image Yes Fails if the file cannot be determined to be ``is_image[field_name]`` - an image based on the mime type. +uploaded Yes Fails if the name of the parameter does not ``uploaded[field_name]`` + match the name of any uploaded files. + If you want the file upload to be optional + (not required), do not define this rule. + +max_size Yes Fails if the uploaded file is larger ``max_size[field_name,2048]`` + than the second parameter + in kilobytes (kb). Or if the file + is larger than allowed maximum size declared + in php.ini config file - + ``upload_max_filesize`` directive. +max_dims Yes Fails if the maximum width and height of an ``max_dims[field_name,300,150]`` + uploaded image exceed values. The first + parameter is the field name. The second is + the width, and the third is the height. Will + also fail if the file cannot be determined + to be an image or the upload failed with an + error other than ``UPLOAD_ERR_NO_FILE``. +min_dims Yes Fails if the minimum width and height of an ``min_dims[field_name,300,150]`` + uploaded image not meet values. The first + parameter is the field name. The second is + the width, and the third is the height. Will + also fail if the file cannot be determined + to be an image or the upload failed with an + error other than ``UPLOAD_ERR_NO_FILE``. + (This rule was added in + v4.6.0.) +mime_in Yes Fails if the file's mime type is not one ``mime_in[field_name,image/png,image/jpeg]`` + listed in the parameters. +ext_in Yes Fails if the client filename's extension is ``ext_in[field_name,png,jpg,gif]`` + not one listed in the parameters, or if the + detected MIME type does not match the MIME + types associated with the extension. +is_image Yes Fails if the file cannot be determined to be ``is_image[field_name]`` + an image based on the mime type. ======================= ========== ============================================= =================================================== The file validation rules apply for both single and multiple file uploads. diff --git a/user_guide_src/source/models/model.rst b/user_guide_src/source/models/model.rst index 76feb2b7c7c1..c37d72c9c2c7 100644 --- a/user_guide_src/source/models/model.rst +++ b/user_guide_src/source/models/model.rst @@ -1039,10 +1039,9 @@ afterUpdate **id** = the array of primary keys of the rows being passed to **data** = the key/value pairs being updated. **result** = the results of the ``update()`` method used through the Query Builder. beforeFind The name of the calling **method**, whether a **singleton** was requested, and these additional fields: -- ``first()`` No additional fields -- ``find()`` **id** = the primary key of the row being searched for. -- ``findAll()`` **limit** = the number of rows to find. - **offset** = the number of rows to skip during the search. + none for ``first()``, **id** = the primary key of the row being searched for, for ``find()``, + and **limit** = the number of rows to find, and **offset** = the number of rows to skip during + the search, for ``findAll()``. afterFind Same as **beforeFind** but including the resulting row(s) of data, or null if no result found. beforeDelete **id** = an array of primary key rows being passed to the ``delete()`` method. **purge** = boolean whether soft-delete rows should be hard deleted. diff --git a/user_guide_src/source/outgoing/view_parser.rst b/user_guide_src/source/outgoing/view_parser.rst index 33f0ef9bc31e..9effccf9ae74 100644 --- a/user_guide_src/source/outgoing/view_parser.rst +++ b/user_guide_src/source/outgoing/view_parser.rst @@ -438,63 +438,64 @@ Provided Filters The following filters are available when using the parser: ================ ================= =========================================================== ====================================== -Filter Arguments Description Example +Filter Arguments Description Example ================ ================= =========================================================== ====================================== -abs Displays the absolute value of a number. { v|abs } +abs Displays the absolute value of a number. ``{ v|abs }`` -capitalize Displays the string in sentence case: all lowercase { v|capitalize} +capitalize Displays the string in sentence case: all lowercase ``{ v|capitalize}`` with firstletter capitalized. -date format (Y-m-d) A PHP **date**-compatible formatting string. { v|date(Y-m-d) } +date format (Y-m-d) A PHP **date**-compatible formatting string. ``{ v|date(Y-m-d) }`` -date_modify value to add A **strtotime** compatible string to modify the date, { v|date_modify(+1 day) } - / subtract like ``+5 day`` or ``-1 week``. +date_modify value to add A **strtotime** compatible string to modify the date, ``{ v|date_modify(+1 day) }`` + / subtract like ``+5 day`` or ``-1 week``. -default default value Displays the default value if the variable is `empty()`_. { v|default(just in case) } +default default value Displays the default value if the variable is `empty()`_. ``{ v|default(just in case) }`` -esc html, attr, Specifies the context to escape the data. { v|esc(attr) } - css, js +esc html, attr, Specifies the context to escape the data. ``{ v|esc(attr) }`` + css, js -excerpt phrase, radius Returns the text within a radius of words from a given { v|excerpt(green giant, 20) } +excerpt phrase, radius Returns the text within a radius of words from a given ``{ v|excerpt(green giant, 20) }`` phrase. Same as **excerpt** helper function. -highlight phrase Highlights a given phrase within the text using { v|highlight(view parser) } - '' tags. +highlight phrase Highlights a given phrase within the text using ``{ v|highlight(view parser) }`` + ```` tags. -highlight_code Highlights code samples with HTML/CSS. { v|highlight_code } +highlight_code Highlights code samples with HTML/CSS. ``{ v|highlight_code }`` -limit_chars limit Limits the number of characters to $limit. { v|limit_chars(100) } +limit_chars limit Limits the number of characters to $limit. ``{ v|limit_chars(100) }`` -limit_words limit Limits the number of words to $limit. { v|limit_words(20) } +limit_words limit Limits the number of words to $limit. ``{ v|limit_words(20) }`` -local_currency currency, Displays a localized version of a currency. "currency" { v|local_currency(EUR,en_US) } - locale, valueis any 3-letter ISO 4217 currency code. - fraction +local_currency currency, Displays a localized version of a currency. "currency" ``{ v|local_currency(EUR,en_US) }`` + locale, valueis any 3-letter ISO 4217 currency code. + fraction -local_number type, precision, Displays a localized version of a number. "type" can be { v|local_number(decimal,2,en_US) } - locale one of: decimal, currency, percent, scientific, spellout, +local_number type, precision, Displays a localized version of a number. "type" can be ``{ v|local_number(decimal,2,en_US) }`` + locale one of: decimal, currency, percent, scientific, spellout, ordinal, duration. -lower Converts a string to lowercase. { v|lower } +lower Converts a string to lowercase. ``{ v|lower }`` -nl2br Replaces all newline characters (\n) to an HTML
tag. { v|nl2br } +nl2br Replaces all newline characters (``\n``) to an HTML ``{ v|nl2br }`` + ``
`` tag. -number_format places Wraps PHP **number_format** function for use within the { v|number_format(3) } +number_format places Wraps PHP **number_format** function for use within the ``{ v|number_format(3) }`` parser. -prose Takes a body of text and uses the **auto_typography()** { v|prose } +prose Takes a body of text and uses the **auto_typography()** ``{ v|prose }`` method to turn it into prettier, easier-to-read, prose. -round places, type Rounds a number to the specified places. Types of **ceil** { v|round(3) } { v|round(ceil) } +round places, type Rounds a number to the specified places. Types of **ceil** ``{ v|round(3) }`` ``{ v|round(ceil) }`` and **floor** can be passed to use those functions instead. -strip_tags allowed chars Wraps PHP **strip_tags**. Can accept a string of allowed { v|strip_tags(
) } +strip_tags allowed chars Wraps PHP **strip_tags**. Can accept a string of allowed ``{ v|strip_tags(
) }`` tags. -title Displays a "title case" version of the string, with all { v|title } +title Displays a "title case" version of the string, with all ``{ v|title }`` lowercase, and each word capitalized. -upper Displays the string in all uppercase. { v|upper } +upper Displays the string in all uppercase. ``{ v|upper }`` ================ ================= =========================================================== ====================================== .. _empty(): https://www.php.net/manual/en/function.empty.php From 52b4bdf0c4aa187353e606dbe2131102ac645d5b Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Mon, 26 Oct 2026 19:26:18 +0800 Subject: [PATCH 2/2] docs: fix rendering for `mb_*` --- user_guide_src/source/changelogs/v4.0.0-alpha.3.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelogs/v4.0.0-alpha.3.rst b/user_guide_src/source/changelogs/v4.0.0-alpha.3.rst index fea90ed55aed..83213e5e3883 100644 --- a/user_guide_src/source/changelogs/v4.0.0-alpha.3.rst +++ b/user_guide_src/source/changelogs/v4.0.0-alpha.3.rst @@ -261,7 +261,7 @@ PRs merged - #1540 Update validation class User Guide - #1530 database performance improvement : use foreach() when possible - 2047b5a Don't run filters when using spark. -- #1539 remove mb_* (mb string usage) in CreditCardRules +- #1539 remove mb\_* (mb string usage) in CreditCardRules - #1536 ext-json in composer.json - #1525 remove unneeded try {} catch {} - #1524 Test routes resource with 'websafe' option