1<?php
2
3namespace dokuwiki\plugin\doi\Resolver;
4
5abstract class AbstractIsbnResolver extends AbstractResolver
6{
7    public function __construct()
8    {
9        $this->defaultResult['idtype'] = 'ISBN';
10        $this->defaultResult['type'] = 'book';
11    }
12
13    /** @inheritdoc */
14    public function getFallbackURL($id)
15    {
16        return 'https://www.google.com/search?q=isbn+' . rawurlencode($id);
17    }
18
19    /** @inheritdoc */
20    public function cleanID($id)
21    {
22        return preg_replace('/[^0-9X]/i', '', $id);
23    }
24
25
26}
27