footsteps-marketing/ace-store 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

footsteps-marketing/ace-store

Composer 安装命令:

composer require footsteps-marketing/ace-store

包简介

Retrieves information about Ace Hardware stores

README 文档

README

#ace-store

Get store info from ACE's store locator API. Supports some neat things.

usage

Install using composer:

composer require footsteps-marketing/ace-store

Then use it in your project

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

$storeNumber = 1234;
$store = new FootstepsMarketing\Ace\Store($storeNumber);
echo $store->getLocationName();

requirements

  • PHP >=5.6

caching

Caching of Ace store responses can be accomplished in two ways:

define('FSM_ACE_CACHE_FOLDER', '/path/to/cache');
$store = new FootstepsMarketing\Ace\Store(1234);

// or

$store = new FootstepsMarketing\Ace\Store(1234, '/path/to/cache');

Cache lifetime defaults to one week -- it can be modified by setting the constant FSM_ACE_CACHE_LIFETIME

define('FSM_ACE_CACHE_LIFETIME', 1 * 24 * 60 * 60); // Desired lifetime in seconds
define('FSM_ACE_CACHE_FOLDER', '/path/to/cache');
$store = new FootstepsMarketing\Ace\Store(1234);

The Ace store response will be stored in the Ace cache folder as <storenumber>.json

configuration

Configuration can be stored in YAML format at the location set using the constant FSM_ACE_CONFIG_PATH

config.yaml

map:
  exclusive: true               # Return only values with valid mappings?
  departments:                  # 'Original Value': 'New Value'
    'Automotive': 'Auto'
    'Clothing': 'Apparel'
    'Gas Stoves': 'Stoves'
  services:
    'Blade Sharpening': 'Knife Sharpening'
    'Chain Saw Sharpening': 'Chainsaw Sharpening'
    'Gift Card': 'Gift Cards'
    'Special Order 65,000+ items': 'Special Order Services'
  brands:
    'Webber Grills': 'Weber Grills'

PHP

define('FSM_ACE_CONFIG_PATH', '/path/to/config.yaml');
$store = new FootstepsMarketing\Ace\Store(1234);

$brands = $store->getServices(); // This will return values based on the mapping above

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPLv3
  • 更新时间: 2016-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固