1 | <?php |
||
11 | class Serie extends Base { |
||
12 | const ALL_SERIES_ID = "cops:series"; |
||
13 | const SQL_ALL_SERIES = |
||
14 | "select series.id as id, series.name as name, series.sort as sort, count(*) as count |
||
15 | from series |
||
16 | inner join books_series_link as link on series.id = link.series |
||
17 | inner join ({0}) as filter on filter.id = link.book |
||
18 | group by series.id, series.name, series.sort |
||
19 | order by series.sort"; |
||
20 | 46 | const SQL_SERIES_FOR_SEARCH = |
|
21 | 46 | "select series.id as id, series.name as name, series.sort as sort, count(*) as count |
|
22 | 46 | from series |
|
23 | 46 | inner join books_series_link as link on series.id = series |
|
24 | inner join ({0}) as filter on filter.id = link.book |
||
25 | 46 | where upper (series.name) like ? |
|
26 | 46 | group by series.id, series.name, series.sort |
|
27 | order by series.sort"; |
||
28 | |||
29 | 7 | public $id; |
|
30 | 7 | public $name; |
|
31 | |||
32 | public function __construct($post) { |
||
36 | |||
37 | public function getUri () { |
||
40 | |||
41 | 45 | public function getEntryId () { |
|
44 | 40 | ||
45 | public static function getCount() { |
||
49 | 1 | ||
50 | 1 | public static function getSerieByBookId ($bookId) { |
|
51 | 1 | $result = parent::getDb ()->prepare('select series.id as id, name |
|
52 | 1 | from books_series_link, series |
|
53 | 1 | where series.id = series and book = ?'); |
|
54 | $result->execute (array ($bookId)); |
||
55 | if ($post = $result->fetchObject ()) { |
||
56 | return new Serie ($post); |
||
57 | } |
||
58 | 2 | return NULL; |
|
59 | 2 | } |
|
60 | |||
61 | public static function getSerieById ($serieId) { |
||
62 | 22 | $result = parent::getDb ()->prepare('select id, name from series where id = ?'); |
|
63 | 22 | $result->execute (array ($serieId)); |
|
64 | if ($post = $result->fetchObject ()) { |
||
65 | return new Serie ($post); |
||
66 | } |
||
67 | return NULL; |
||
68 | } |
||
69 | |||
70 | public static function getAllSeries() { |
||
73 | |||
74 | public static function getAllSeriesByQuery($query) { |
||
77 | } |
||
78 |
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.