runopencode/dm-common-helpers-plugin
Composer 安装命令:
composer require runopencode/dm-common-helpers-plugin
包简介
dmCommonHelpersPlugin - The collection of common helpers and libraries for Diem Extended
README 文档
README
Author: TheCelavi, Grouchy
Version: 0.0.2
Stability: Stable
Date: December 9th, 2012
Courtesy of Run Open Code
License: Free for all
dmCommonHelpersPlugin for Diem Extended is collection of common:
- template helpers
- helpers
- classes and libraries
that are used in various plugins provided by RunOpenCode, and, of course, they can be used for projects as well.
Additional utilities are most welcome.
Currently implemented template helpers
###File helper functions:
format_file_size_from_bytes: Formats size of file in bytes to bytes, KBs, MBs or GBs with size labelformat_posix_file_permissions_to_human: Formats posix file permissions to humanget_posix_file_owner_info_by_id: Returns required info regarding ownerget_posix_file_group_info_by_id: Returns required info regarding groupget_file_properties: Returns common OS properties for file HDD
Word helper functions:
get_reduced_raw_text: Reduce given raw text to defined number of words or chars
Money helper functions:
format_amount: Formats amount of money according to the format settings inconfig.yml
Currently implemented utility classes
dmConsoleLog class:
The class can be injected via service container, as console_log service. The service ought to be used
for the logging into console, for tasks.
Even if this is enabled to do trough tasks, by using this service, you can write service that can be used in task and service can log into console, if service is called from task.
In that matter, there is no duplicated code (service and task doing the same thing).
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: Free
- 更新时间: 2012-12-09