zendframework/zendxml
最新稳定版本:1.2.0
Composer 安装命令:
composer require zendframework/zendxml
包简介
Utility library for XML usage, best practices, and security in PHP
关键字:
README 文档
README
Repository abandoned 2019-12-31
This repository has moved to laminas/laminas-xml.
An utility component for XML usage and best practices in PHP
Installation
You can install using:
curl -s https://getcomposer.org/installer | php
php composer.phar install
Notice that this library doesn't have any external dependencies, the usage of composer is for autoloading and standard purpose.
ZendXml\Security
This is a security component to prevent XML eXternal Entity (XXE) and XML Entity Expansion (XEE) attacks on XML documents.
The XXE attack is prevented disabling the load of external entities in the libxml library used by PHP, using the function libxml_disable_entity_loader.
The XEE attack is prevented looking inside the XML document for ENTITY usage. If the XML document uses ENTITY the library throw an Exception.
We have two static methods to scan and load XML document from a string (scan) and from a file (scanFile). You can decide to get a SimpleXMLElement or DOMDocument as result, using the following use cases:
use ZendXml\Security as XmlSecurity; $xml = <<<XML <?xml version="1.0"?> <results> <result>test</result> </results> XML; // SimpleXML use case $simplexml = XmlSecurity::scan($xml); printf ("SimpleXMLElement: %s\n", ($simplexml instanceof \SimpleXMLElement) ? 'yes' : 'no'); // DOMDocument use case $dom = new \DOMDocument('1.0'); $dom = XmlSecurity::scan($xml, $dom); printf ("DOMDocument: %s\n", ($dom instanceof \DOMDocument) ? 'yes' : 'no');
zendframework/zendxml 适用场景与选型建议
zendframework/zendxml 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.02M 次下载、GitHub Stars 达 29, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「xml」 「security」 「ZendFramework」 「zf」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zendframework/zendxml 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zendframework/zendxml 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zendframework/zendxml 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide a way to secure accesses to all routes of an symfony application.
Load DOM document safety
It's a barebone security class written on PHP
A module manager for Zend Framework which can be used to create configs per domain.
Contao CMS integrity check for some files
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
统计信息
- 总下载量: 9.02M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 21
- 依赖项目数: 34
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-01-04