1 | <?php |
||
18 | class Article extends ContentAbstract |
||
19 | { |
||
20 | /** |
||
21 | * name of the table |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | |||
26 | protected $_table = 'articles'; |
||
27 | |||
28 | /** |
||
29 | * get the article by alias |
||
30 | * |
||
31 | * @since 4.0.0 |
||
32 | * |
||
33 | * @param string $articleAlias alias of the article |
||
34 | * |
||
35 | * @return object|null |
||
36 | */ |
||
37 | |||
38 | 2 | public function getByAlias(string $articleAlias = null) : ?object |
|
42 | |||
43 | /** |
||
44 | * count the articles by category and language |
||
45 | * |
||
46 | * @since 4.0.0 |
||
47 | * |
||
48 | * @param int $categoryId identifier of the category |
||
49 | * @param string $language |
||
50 | * |
||
51 | * @return int|null |
||
52 | */ |
||
53 | |||
54 | 3 | public function countByCategoryAndLanguage(int $categoryId = null, string $language = null) : ?int |
|
66 | |||
67 | /** |
||
68 | * get the siblings by category and language and order and step |
||
69 | * |
||
70 | * @since 4.0.0 |
||
71 | * |
||
72 | * @param int $categoryId identifier of the category |
||
73 | * @param string $language |
||
74 | * @param string $orderColumn |
||
75 | * @param int $limitStep |
||
76 | * |
||
77 | * @return object|null |
||
78 | */ |
||
79 | |||
80 | 5 | public function getSiblingByCategoryAndLanguageAndOrderAndStep(int $categoryId = null, string $language = null, string $orderColumn = 'rank', int $limitStep = null) : ?object |
|
95 | |||
96 | /** |
||
97 | * get the article route by id |
||
98 | * |
||
99 | * @since 3.3.0 |
||
100 | * |
||
101 | * @param int $articleId identifier of the article |
||
102 | * |
||
103 | * @return string|null |
||
104 | */ |
||
105 | |||
106 | 6 | public function getRouteById(int $articleId = null) : ?string |
|
130 | } |
||
131 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: