webdevgods / wdg-cafepress
一个 ZF2 Cafepress 模块。
dev-master
2014-08-28 12:32 UTC
Requires
- php: >=5.3.3
- zendframework/zendframework: ~2.1
This package is not auto-updated.
Last update: 2024-09-24 01:58:26 UTC
README
##安装
将 WdgCafepress 添加到项目的 composer.json 文件中
"require": { "php": ">=5.3.3", "webdevgods/wdg-cafepress": "dev-master", }
##配置
1. 将 wdgcafepress.global.php.dist 复制到 config/autoload 文件夹,并移除 .dist 扩展名。
2. 将您的 apikey 和 store id 添加到 wdgcafepress.global.php 文件中。
return array( "wdgcafepress" => array( "apikey" => "", "storeid" => "", "baseurl" => "http://open-api.cafepress.com/" //Cafepress api base url ) );
3. 将 WdgCafepress 添加到 application.config.php 文件的 "modules" 数组中。
##使用
$cafepress_service = $service_locator->get("wdgcafepress_service_cafepress"); $sections = $cafepress_service->getStoreSections(); foreach($sections as $section) { echo $section->getCaption()."<br />"; }