1 | <?php |
||
11 | class Serie extends Base { |
||
12 | const ALL_SERIES_ID = "cops:series"; |
||
13 | const SERIES_COLUMNS = "series.id as id, series.name as name, series.sort as sort, count(*) as count"; |
||
14 | const SQL_ALL_SERIES = "select {0} from series, books_series_link where series.id = series group by series.id, series.name, series.sort order by series.sort"; |
||
15 | const SQL_SERIES_FOR_SEARCH = "select {0} from series, books_series_link where series.id = series and upper (series.name) like ? group by series.id, series.name, series.sort order by series.sort"; |
||
16 | |||
17 | public $id; |
||
18 | public $name; |
||
19 | |||
20 | 46 | public function __construct($post) { |
|
24 | |||
25 | 46 | public function getUri () { |
|
28 | |||
29 | 7 | public function getEntryId () { |
|
32 | |||
33 | 7 | public static function getCount() { |
|
37 | |||
38 | 45 | public static function getSerieByBookId ($bookId) { |
|
39 | 45 | $result = parent::getDb ()->prepare('select series.id as id, name |
|
40 | from books_series_link, series |
||
41 | 45 | where series.id = series and book = ?'); |
|
42 | 45 | $result->execute (array ($bookId)); |
|
43 | 45 | if ($post = $result->fetchObject ()) { |
|
44 | 40 | return new Serie ($post); |
|
45 | } |
||
46 | 19 | return NULL; |
|
47 | } |
||
48 | |||
49 | 1 | public static function getSerieById ($serieId) { |
|
50 | 1 | $result = parent::getDb ()->prepare('select id, name from series where id = ?'); |
|
51 | 1 | $result->execute (array ($serieId)); |
|
52 | 1 | if ($post = $result->fetchObject ()) { |
|
53 | 1 | return new Serie ($post); |
|
54 | } |
||
55 | return NULL; |
||
56 | } |
||
57 | |||
58 | 2 | public static function getAllSeries() { |
|
61 | |||
62 | 22 | public static function getAllSeriesByQuery($query) { |
|
65 | } |
||
66 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.