tuupola/corelocation
Composer 安装命令:
composer require tuupola/corelocation
包简介
PHP implementation of Apple location services protocol
README 文档
README
Proof of concept PHP implementation of Apple location services protocol. This library does not do any actual requests. It is used only for creating and parsing requests and responses.
Install
Install the library using Composer.
$ composer require tuupola/corelocation
Usage
Request
Request class returns a binary string. It is up to reader to figure out what to do with it.
require __DIR__ . "/vendor/autoload.php"; use Tuupola\CoreLocation\Request; $request = new Request(["aa:aa:aa:aa:aa:aa", "bb:bb:bb:bb:bb:bb"]); $hex = bin2hex($request->body()); print_r(str_split($hex, 64)); /* Array ( [0] => 00010005656e5f55530013636f6d2e6170706c652e6c6f636174696f6e64000c [1] => 382e342e312e313248333231000000010000002c12130a1161613a61613a6161 [2] => 3a61613a61613a616112130a1162623a62623a62623a62623a62623a62622064 ) */
Response
Respons class can be used for unserializing the response. It is up to reader to figure out how to get a response.
require __DIR__ . "/vendor/autoload.php"; use Tuupola\CoreLocation\Response; $data = file_get_contents("response.bin"); $response = (new Response)->fromString($data); foreach ($response as $router) { print_r($router); } /* Array ( [mac] => cc:cc:cc:cc:cc:cc [latitude] => 27.98785, [longitude] => 86.9228374 [accuracy] => 42 [channel] => 10 ) ... */
Testing
You can run tests either manually or automatically on every code change. Automatic tests require entr to work.
$ make test
$ brew install entr $ make watch
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email tuupola@appelsiini.net instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
tuupola/corelocation 适用场景与选型建议
tuupola/corelocation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60 次下载、GitHub Stars 达 3, 最近一次更新时间为 2017 年 05 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wifi」 「geoposition」 「corelocation」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tuupola/corelocation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tuupola/corelocation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tuupola/corelocation 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A clean, modern, and easy-to-use QR code generator for Laravel
A sub-module for Access Manager
A sub-module for Access Manager
A sub-module for Access Manager
A sub-module for Access Manager
Trilateration for PHP
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-13