liberty_code_module / handle_model
Module
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: 2025-01-28 20:35:31 UTC
README
Description
Library contains framework modules, to manage application handle model components.
Requirement
- Script language: PHP: version 7 || 8
Framework module installation requirement
Module repository: liberty_code_module/validation: version 1.0
- Module validation (or equivalent).
- Module rule (or equivalent).
Module repository: liberty_code_module/datetime: version 1.0
- Module datetime (or equivalent).
Installation
Several ways are possible:
Composer
Requirement
It requires composer installation. For more information: https://getcomposer.org
Command: Move in project root path
cd "<project_root_path>"
Command: Installation
php composer.phar require liberty_code_module/handle_model ["<version>"]
Note
Include vendor
If project uses composer, vendor must be included:
require_once('<project_root_path>/vendor/autoload.php');
Configuration
Installation command allows to add, on composer file "
{ "require": { "liberty_code_module/handle_model": "<version>" } }
Include
Download
- Download following repository.
- Put it on repository root path.
Include source
require_once('<repository_root_path>/include/Include.php');
Application installation
Configuration
Configuration: application module: "
Add in list part, required modules:
Example for YML configuration format, from composer installation:
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 } } ]
Configuration
Application parameters configuration
Use following file on your modules to configure specific elements
<module_root_path>/config/ParamApp.php
Elements configurables
Configuration to param attribute specification.
Configuration to hydrate data type collection.
Configuration to param basic data types.
Configuration to param cache.
Usage
Following examples consider command line application relative path as "bin/app".
Attribute
Features allow to set and manage attribute specification, available in application.
Example
cd "<project_root_path>"
...
// Get all attribute data types
php bin/app attribute:spec:get:data-type
Type
Features allow to set and manage basic data types, available for attribute specification.
Cache
Features allow to set and manage cache, available for application attribute specification.