@@ -152,6 +152,9 @@ discard block |
||
152 | 152 | return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title); |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param Book $book |
|
157 | + */ |
|
155 | 158 | public static function getDataByBook ($book) { |
156 | 159 | $out = array (); |
157 | 160 | $result = parent::getDb ()->prepare('select id, format, name |
@@ -165,6 +168,9 @@ discard block |
||
165 | 168 | return $out; |
166 | 169 | } |
167 | 170 | |
171 | + /** |
|
172 | + * @param string $urlParam |
|
173 | + */ |
|
168 | 174 | public static function handleThumbnailLink ($urlParam, $height) { |
169 | 175 | global $config; |
170 | 176 | |
@@ -184,6 +190,10 @@ discard block |
||
184 | 190 | return $urlParam; |
185 | 191 | } |
186 | 192 | |
193 | + /** |
|
194 | + * @param string $type |
|
195 | + * @param string $filename |
|
196 | + */ |
|
187 | 197 | public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL, $view = false) |
188 | 198 | { |
189 | 199 | global $config; |
@@ -208,6 +208,9 @@ discard block |
||
208 | 208 | return 'index.php' . $urlParam; |
209 | 209 | } |
210 | 210 | |
211 | + /** |
|
212 | + * @return string |
|
213 | + */ |
|
211 | 214 | public function getTitle () { |
212 | 215 | return $this->title; |
213 | 216 | } |
@@ -395,6 +398,9 @@ discard block |
||
395 | 398 | return reset($reduced); |
396 | 399 | } |
397 | 400 | |
401 | + /** |
|
402 | + * @param string $extension |
|
403 | + */ |
|
398 | 404 | public function getFilePath($extension, $idData = NULL, $relative = false) |
399 | 405 | { |
400 | 406 | /*if ($extension == 'jpg') |
@@ -562,6 +568,9 @@ discard block |
||
562 | 568 | $this->getLinkArray(), $this); |
563 | 569 | } |
564 | 570 | |
571 | + /** |
|
572 | + * @param integer $database |
|
573 | + */ |
|
565 | 574 | public static function getBookCount($database = NULL) { |
566 | 575 | return parent::executeQuerySingle('select count(*) from books', $database); |
567 | 576 | } |
@@ -610,7 +619,7 @@ discard block |
||
610 | 619 | } |
611 | 620 | |
612 | 621 | /** |
613 | - * @param $customColumn CustomColumn |
|
622 | + * @param CustomColumn $customColumn CustomColumn |
|
614 | 623 | * @param $id integer |
615 | 624 | * @param $n integer |
616 | 625 | * @return array |
@@ -650,6 +659,10 @@ discard block |
||
650 | 659 | return NULL; |
651 | 660 | } |
652 | 661 | |
662 | + /** |
|
663 | + * @param integer $database |
|
664 | + * @param integer $numberPerPage |
|
665 | + */ |
|
653 | 666 | public static function getBooksByQuery($query, $n, $database = NULL, $numberPerPage = NULL) { |
654 | 667 | $i = 0; |
655 | 668 | $critArray = array(); |
@@ -697,6 +710,9 @@ discard block |
||
697 | 710 | return $entryArray; |
698 | 711 | } |
699 | 712 | |
713 | + /** |
|
714 | + * @param integer $numberPerPage |
|
715 | + */ |
|
700 | 716 | public static function getBooksByStartingLetter($letter, $n, $database = NULL, $numberPerPage = NULL) { |
701 | 717 | return self::getEntryArray(self::SQL_BOOKS_BY_FIRST_LETTER, array($letter . '%'), $n, $database, $numberPerPage); |
702 | 718 | } |
@@ -54,6 +54,10 @@ |
||
54 | 54 | return Base::getEntryArrayWithBookNumber ($sql, self::TAG_COLUMNS, array (), "Tag"); |
55 | 55 | } |
56 | 56 | |
57 | + /** |
|
58 | + * @param string $query |
|
59 | + * @param integer $numberPerPage |
|
60 | + */ |
|
57 | 61 | public static function getAllTagsByQuery($query, $n, $database = NULL, $numberPerPage = NULL) { |
58 | 62 | $columns = "tags.id as id, tags.name as name, (select count(*) from books_tags_link where tags.id = tag) as count"; |
59 | 63 | $sql = 'select {0} from tags where upper (tags.name) like ? {1} order by tags.name'; |