定制 sprain/bookfinder 二次开发

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

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

sprain/bookfinder

Composer 安装命令:

composer require sprain/bookfinder

包简介

A php library to find books via different apis

关键字:

README 文档

README

A php library to find books via different apis

Functionalities

  • Find books by ISBN over different providers
  • Included providers:
    • Google Books API
    • Amazon Product Advertising API
  • Add custom providers to find books e.q. in local database

Installation

Add SprainBookFinder in your composer.json:

{
    "require": {
        "sprain/bookfinder": "~0.1"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update sprain/bookfinder

Usage

See example.php for usage.

Add custom provider

Adding your own provider is simple:

Create provider

<?php

namespace Acme\Your\Namespace;

use Sprain\BookFinder\Providers\BaseProvider\BaseProvider;
use Sprain\BookFinder\Providers\Interfaces\ProviderInterface;

class MyCustomProvider extends BaseProvider implements ProviderInterface
{
    public function searchByIsbn($isbn)
    {
        // perform search, e.q. in a local database
    }

    public function getResults()
    {
        // return array of normalized results
    }

    public function getDefaultName()
    {
        return 'My Own Awesome Book Provider';
    }
}

Add provider to BookFinder

Add your provider to the providers array as seen in example.php.

License

This bundle is under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固