lyquidity/utilities
Composer 安装命令:
composer require lyquidity/utilities
包简介
Utility classes to provide a tuple dictionary and to convert a simple XML class to an array
关键字:
README 文档
README
Table of contents
About the project
This project defines two classes: TupleDictionary and SimpleXMLElementToArray to make it easier to compare PHP arrays and XML fragments.
Motivation
This project is standalone but is part of the XBRL project.
The XBRL project needs the ability to determine if two arrays representsing a collection of key/value pairs are identical and hold data against those pairs. This is achieved using the TupleDictionary class.
It also sometimes necessary, for example when examining segment or scenarios within contexts in instance documents, to be able to compare for equality the elements defined under segments or scenarios of a pair of contexts. The SimpleXMLElementToArray class makes it simple to convert the elements defined under a segment or scenario element node to an array so they can be compared following the various rules defined by the XBRL 2.1 specification.
It is common to need to create a temporary file to hold zip contents and then tidy up after. The MemoryWrapper is a StreamWrapper implementation that provides a named in-memory pseudo file that can be uses to store content. The 'filename' can then be passed to another function such as file_get_contents() so the contents can be accessed. The pseudo file will be lost when the script terminates so there is no need to explcitly delete the file. However the file can be explicitly deleted to recover memory.
Dependencies
This project depends on pear/log and lyquidity/xml
License
This project is released under GPL version 3.0
What does this mean?
It means you can use the source code in any way you see fit. However, the source code for any changes you make must be made available to others and must be made available on the same terms as you receive the source code in this project: under a GPL v3.0 license. You must include the license of this project with any distribution of the source code whether the distribution includes all the source code or just part of it. For example, if you create a class that derives from one of the classes provided by this project - a new taxonomy class, perhaps - that is derivative.
What does this not mean?
It does not mean that any products you create that only use this source code must be released under GPL v3.0. If you create a budgeting application that uses the source code from this project to access data in instance documents, used by the budgeting application to transfer data, that is not derivative.
Contributing
We welcome contributions. See our contributions page for more information. If you do choose to contribute we will ask you to agree to our Contributor License Agreement (CLA). We will ask you to agree to the terms in the CLA to assure other users that the code they use is not going to be encumbered by a labyrinth of different license and patent liabilities. You are also urged to review our code of conduct.
Install
The project can be installed by composer. Assuming Composer is installed and a shortcut to the program is called 'composer' then the command to install this project is:
composer require lyquidity/utilities:dev-master lyquidity/xml:dev-master --prefer-dist
Or fork or download the repository. The source can be found in the 'source' sub-folder.
Getting started
The test.php file includes illustrations of using the classes.
Assuming you have installed the library using composer then this PHP application will run the test:
<?php require_once __DIR__ . '/vendor/autoload.php'; include __DIR__ . "/vendor/lyquidity/utilities/test.php";
lyquidity/utilities 适用场景与选型建议
lyquidity/utilities 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.1k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「SimpleXML」 「tuple」 「lyquidity」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lyquidity/utilities 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lyquidity/utilities 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lyquidity/utilities 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A bridge between SimpleXML and the DOM extension, plus a bunch of convenience methods
Some extra functions to work with SimpleXml.
Extends XMLReader PHP class, for simple SAX-reading and XPath queries of huge XML files.
Reads XML Schema documents (.xsd) files and extracts type information for PHP
Provides XPath 2.0 statement execution library for PHP
Classes that implement the XBRL 2.1, XDT, Formulas, Generics and XFI specifications
统计信息
- 总下载量: 5.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2018-05-19