PHP code example of sprain / bookfinder
1. Go to this page and download the library: Download sprain/bookfinder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sprain / bookfinder example snippets
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';
}
}
bash
$ php composer.phar update sprain/bookfinder