liberty_code_module / handle_model
模块
v1.0.0
2024-02-28 18:40 UTC
Requires
- php: ~7 || ~8
- liberty_code/cache: ^1.0.
- liberty_code/controller: ^1.0.
- liberty_code/di: ^1.0.
- liberty_code/framework: ^1.0.
- liberty_code/handle_model: ^1.0.
- liberty_code/model: ^1.0.
- liberty_code/register: ^1.0.
- liberty_code/request_flow: ^1.0.
This package is auto-updated.
Last update: 2024-09-28 19:47:34 UTC
README
描述
库包含框架模块,用于管理应用程序处理模型组件。
要求
- 脚本语言:PHP:版本 7 || 8
框架模块安装要求
模块仓库:liberty_code_module/validation:版本 1.0
- 模块验证(或等效)。
- 模块规则(或等效)。
模块仓库:liberty_code_module/datetime:版本 1.0
- 模块 datetime(或等效)。
安装
有几种可能的方式
Composer
要求
需要安装 Composer。更多信息: https://getcomposer.org.cn
命令:移动到项目根路径
cd "<project_root_path>"
命令:安装
php composer.phar require liberty_code_module/handle_model ["<version>"]
注意
包含供应商
如果项目使用 composer,则必须包含供应商
require_once('<project_root_path>/vendor/autoload.php');
配置
安装命令允许在 composer 文件中添加,“
{ "require": { "liberty_code_module/handle_model": "<version>" } }
包含
下载
- 下载以下仓库。
- 将其放在仓库根路径。
包含源代码
require_once('<repository_root_path>/include/Include.php');
应用程序安装
配置
配置:应用程序模块:"
在列表部分添加,所需模块
YML 配置格式示例,从 composer 安装
list: [ { path: "/vendor/liberty_code_module/handle_model/src/attribute", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } }, { path: "/vendor/liberty_code_module/handle_model/src/type", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } }, { path: "/vendor/liberty_code_module/handle_model/src/cache", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } } ]
配置
应用程序参数配置
在您的模块中使用以下文件来配置特定元素
<module_root_path>/config/ParamApp.php
可配置元素
到参数属性规范的配置。
到填充数据类型集合的配置。
到参数基本数据类型的配置。
到参数缓存的配置。
用法
以下示例假设命令行应用程序相对路径为 "bin/app"。
属性
功能允许设置和管理应用程序中可用的属性规范。
示例
cd "<project_root_path>"
...
// Get all attribute data types
php bin/app attribute:spec:get:data-type
类型
功能允许设置和管理适用于属性规范的基层数据类型。
缓存
功能允许设置和管理适用于应用程序属性规范的缓存。