定制 toniette/xlr8 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

toniette/xlr8

Composer 安装命令:

composer require toniette/xlr8

包简介

a simple package to demonstrate my skills

README 文档

README

<?php

use Xlr8\Sortable;
use Xlr8\Search;

require_once __DIR__ . '/vendor/autoload.php';

Search::setSources([
    'https://xlr8-interview-files.s3.eu-west-2.amazonaws.com/source_1.json',
    'https://xlr8-interview-files.s3.eu-west-2.amazonaws.com/source_2.json'
]);

$orderedHotels = Search::getNearbyHotels(-23.6814347,-46.9249416, Sortable::PRICE_PER_NIGHT);

foreach ($orderedHotels as $hotel) {
    echo sprintf(
        '%s, %s KM, %s EUR',
        $hotel['name'],
        round($hotel['proximity'], 2),
        $hotel['price_per_night']
    ) . PHP_EOL;
}

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-10-24