51degrees / fiftyone.geolocation
51Degrees Pipeline API的地缘位置引擎。使用经纬度进行反向地理编码,以填充邮政地址。
4.5.3.0
2024-05-16 19:33 UTC
Requires
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.39
- phpstan/phpstan: ^1.10
- phpunit/phpunit: *
- dev-main
- 4.5.3.0
- 4.5.2.0
- 4.5.1.0
- 4.5.0.0
- 4.4.27.0
- 4.4.26.0
- 4.4.25.0
- 4.4.24.0
- 4.4.23.0
- 4.4.22.0
- 4.4.21.0
- 4.4.20.0
- 4.4.19.0
- 4.4.18.0
- 4.4.17.0
- 4.4.16.0
- 4.4.15.0
- 4.4.14.0
- 4.4.13.0
- 4.4.12.0
- 4.4.11.0
- 4.4.10.0
- 4.4.9.0
- 4.4.8.0
- 4.4.7.0
- 4.4.6.0
- 4.4.5.0
- 4.4.4.0
- 4.4.3.0
- 4.4.2.0
- 4.4.1
- 4.4.0
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.2+4
- 4.2.1+4
- 4.2.0
- 4.1.1+2
- 4.1.0
- 4.1.0-beta.3+2
- dev-copyright-update
This package is auto-updated.
Last update: 2024-09-16 20:34:31 UTC
README
简介
此存储库包含PHP实现的Pipeline API的地缘位置引擎。
先决条件
Pipeline引擎是用PHP编写的,针对5和7。
包
- geoLocation - 一个Node.js引擎,通过从51Degrees云服务消费数据来检索地缘位置结果。
- geoLocationPipelineBuilder - 包含地缘位置引擎构建器。
安装
您可以选择引用此存储库中的项目,或者引用项目中的Composer包。
"require": {
"51degrees/fiftyone.geolocation": "@dev",
...
请确保从Composer中选择最新版本。
配置选项
- String
type
- 要使用的地缘位置服务类型的名称。 - String
resourceKey
- 资源密钥是在云服务中用于监控使用的证据。 获取资源密钥。 - Array
restrictedProperties
- 要在结果中填充值的属性(默认情况下全部填充)。
示例
示例可以在examples
文件夹中找到。以下为示例列表。
确保在运行示例脚本之前将环境变量resource_key
设置为您的资源密钥。
要运行示例,请进入examples
目录并运行
php -S localhost:8080
现在可以在浏览器中查看示例。例如,通过浏览到localhost:8080/cloud/gettingstarted.php
可以查看云入门示例。
测试
在此存储库中,有使用phpunit的测试。您需要安装包依赖项才能运行它们
composer install
要运行测试,请调用
phpunit --fail-on-warning --display-warnings --log-junit test-results.xml
项目文档
有关Pipeline API及其相关引擎的完整文档,请参阅51Degrees文档网站。