exertis/yii2-experian-qas
Composer 安装命令:
composer require exertis/yii2-experian-qas
包简介
Experian QAS Pro On Demand Postocde lookup SOAP service integration for the Yii framework. See also http://support.qas.com/experian_qas_pro_ondemand__php_only__technical_update_2021.htm
README 文档
README
Packaging Experian QAS Pro On Demand for Yii2 and Packagist
Rough Usage Example
This example is based on the Yii2 Framework, hence \Yii::$app->params['qas.username'] and \Yii::$app->params['qas.password'] will yield username and password from the Yii parameters file.
This example performs the setup and search.
define("CONTROL_WSDL_URN", "https://your.wsdl.storage/ProOnDemandService.wsdl"); $qas = new \exertis\experianqas\QuickAddress(CONTROL_WSDL_URN); if (empty($qas)) { throw new Exception('QAS: Initial connection failed'); } $qas->setQASCredentials(\Yii::$app->params['qas.username'], \Yii::$app->params['qas.password']); // Find out available DataSets $aDataSets = $qas->getAllDataSets(); $sPromptSet = $qas->getPromptSet('GBR'); $layouts = $qas->getAllLayouts('GBR'); # Perform the initial search (singleline engine, flattened picklists) $qas->setEngineType(QAS_SINGLELINE_ENGINE); $qas->setFlatten(TRUE); $picklist = $qas->searchSingleline('GBR', [$postcode], 'Optimal');
The result is a 'picklist' which you could process as follows:
if (!empty($picklist->atItems) && is_array($picklist->atItems)) { // loop through each possible matched address $addresses = []; foreach ($picklist->atItems as $atItem) { //$formattedAddress = $qas->getFormattedAddress('QADefault', $atItem->Moniker); $formattedAddress = $qas->getFormattedAddress('FullPAF', $atItem->Moniker); // FormattedAddress $address = [ 'picklistvalue' => $atItem->Picklist, 'flatNumber' => $formattedAddress->atAddressLines[5]->Line, // Sub-building name 'houseName' => $formattedAddress->atAddressLines[7]->Line, // Building name 'houseNumber' => $formattedAddress->atAddressLines[8]->Line, // Building number 'streetName' => $formattedAddress->atAddressLines[15]->Line, // Thoroughfare 'locality' => $formattedAddress->atAddressLines[18]->Line, // Dependent locality 'town' => $formattedAddress->atAddressLines[20]->Line, // Town 'county' => $formattedAddress->atAddressLines[21]->Line, // County 'id' => $atItem->Moniker, ]; $addresses[] = $address; } // foreach
exertis/yii2-experian-qas 适用场景与选型建议
exertis/yii2-experian-qas 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「postcode」 「yii2」 「qas」 「experian」 「lookup」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 exertis/yii2-experian-qas 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 exertis/yii2-experian-qas 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 exertis/yii2-experian-qas 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
Spikkl API client library for PHP
Symfony Bundle for commonground balance functionality
Validates Zip/Postal Codes for any country and provides each country's localized name for their version of the Zip/Postal code (CEP, PLZ, PIN code, Eircode, NPA, CAP, ZIP code, etc.).
Get Address IO wrapper covering all endpoints available from the API.
SCEditor, a lightweight WYSIWYG BBCode & HTML editor extension for Yii 2.0 Framework
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-02-24