Skip to content

Commit

Permalink
修复错误
Browse files Browse the repository at this point in the history
  • Loading branch information
hex-ci committed Jul 11, 2024
1 parent cc80f95 commit ed2cdf4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/database/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $db->getFieldData()
- ``max_length`` - 列的最大长度
- ``nullable`` - 如果列允许为空,则为布尔值 ``true`` ,否则为布尔值 ``false``
- ``default`` - 默认值
- ``primary_key`` - 如果列是主键,则为整数 ``1``(即使有多个主键,所有主键值都是整数 ``1``),否则为整数 ``0``(此字段目前仅对 ``MySQLi`` 和 ``SQLite3`` 可用)
- ``primary_key`` - 如果列是主键,则为整数 ``1`` (即使有多个主键,所有主键值都是整数 ``1``),否则为整数 ``0`` (此字段目前仅对 ``MySQLi`` 和 ``SQLite3`` 可用)

.. note:: 自 v4.4.0 起,SQLSRV 支持 ``nullable``。

Expand Down
2 changes: 1 addition & 1 deletion source/installation/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ PHP 预加载
配置
-------------

打开 ``php.ini`` 或 ``xx-opcache.ini``(如果你将 INI 配置分离开来),建议设置 ``opcache.preload=/path/to/preload.php`` 和 ``opcache.preload_user=myuser``。
打开 ``php.ini`` 或 ``xx-opcache.ini`` (如果你将 INI 配置分离开来),建议设置 ``opcache.preload=/path/to/preload.php`` 和 ``opcache.preload_user=myuser``。

.. note:: ``myuser`` 是在你的 Web 服务器中运行的用户。如果你想找到分离的 INI 配置的位置,只需运行 ``php --ini`` 或打开 ``phpinfo()`` 文件并搜索 *Additional .ini files parsed*。

Expand Down
2 changes: 1 addition & 1 deletion source/installation/installing_composer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Composer 可以通过两种方式在你的系统上安装 CodeIgniter4。

第一个方法描述了如何使用 CodeIgniter4 创建一个项目骨架(App Starter),你可以将其作为新 Web 应用的基础。下面描述的第二个方法允许你将 CodeIgniter4 添加到已有的 Web 应用中。

.. note:: 如果你使用 Git 仓库来存储代码或与他人协作,那么 **vendor** 文件夹通常会被 “git 忽略”。在这种情况下,当你将仓库克隆到一个新系统时,你需要执行 ``composer install``(如果你想更新所有 Composer 依赖项,则执行 ``composer update``)。
.. note:: 如果你使用 Git 仓库来存储代码或与他人协作,那么 **vendor** 文件夹通常会被 “git 忽略”。在这种情况下,当你将仓库克隆到一个新系统时,你需要执行 ``composer install`` (如果你想更新所有 Composer 依赖项,则执行 ``composer update``)。

App Starter
===========
Expand Down
2 changes: 0 additions & 2 deletions source/models/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,6 @@ save()

.. literalinclude:: model/019.php

save 方法在使用自定义类结果对象时也可以大大简化工作,它会识别非简单对象并将其公共和受保护的值提取到一个数组中,然后传递给适当的 insert 或 update 方法。这允许你以非常简洁的方式使用实体类。实体类是表示单个对象实例的简单类,如用户、博客文章、工作等。此类负责维护与对象本身相关的业务逻辑,如以某种方式格式化元素等。它们不应该知道它们是如何保存到数据库的。最简单的,它们可能看起来像这样:

save 方法还可以通过识别非简单对象并将其公共和受保护的值抓取到一个数组中,然后将该数组传递给适当的 insert 或 update 方法,从而使处理自定义类结果对象变得更加简单。这使你可以非常简洁地使用 Entity 类。Entity 类是表示某种对象类型的单个实例的简单类,比如用户、博客文章、工作等。这个类负责维护围绕对象本身的业务逻辑,比如以某种方式格式化元素等。它们不应该知道如何将自己保存到数据库中。最简单的情况下,它们可能看起来像这样:

.. literalinclude:: model/020.php
Expand Down
2 changes: 1 addition & 1 deletion source/testing/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ trace()

.. note:: 当你的 ``baseURL`` 设置(在 **app/Config/App.php** 或 ``app.baseURL`` 在 **.env** 中)与实际 URL 不匹配时,不会显示调试工具栏。

工具栏本身显示为一个 :doc:`后置过滤器 </incoming/filters>`。你可以通过从 **app/Config/Filters.php** 文件的 ``$required``(或 ``$globals``)属性中移除 ``'toolbar'`` 来阻止它运行。
工具栏本身显示为一个 :doc:`后置过滤器 </incoming/filters>`。你可以通过从 **app/Config/Filters.php** 文件的 ``$required`` (或 ``$globals``)属性中移除 ``'toolbar'`` 来阻止它运行。

.. note:: 在 v4.5.0 之前,工具栏默认设置为 ``$globals``。

Expand Down

0 comments on commit ed2cdf4

Please sign in to comment.