1 | <?php |
||
12 | class Country extends Model implements NamedModel |
||
13 | { |
||
14 | /** @var string The name of the country */ |
||
15 | protected $name; |
||
16 | |||
17 | /** @var string The ISO code of the country */ |
||
18 | protected $iso; |
||
19 | |||
20 | const DELETED_COLUMN = 'is_deleted'; |
||
21 | const TABLE = 'countries'; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | protected function assignResult($country) |
||
31 | |||
32 | /** |
||
33 | * Get the name of the country in the default language |
||
34 | * |
||
35 | 1 | * @return string The name of the country |
|
36 | */ |
||
37 | 1 | public function getName() |
|
41 | |||
42 | /** |
||
43 | * Get the ISO code of a country |
||
44 | * |
||
45 | * @return string The ISO code of the country |
||
46 | 1 | */ |
|
47 | public function getISO() |
||
51 | |||
52 | /** |
||
53 | * Get the HTML to display a specific flag |
||
54 | * |
||
55 | * @return string HTML to generate a flag |
||
56 | 1 | */ |
|
57 | public function getFlagLiteral() |
||
61 | |||
62 | /** |
||
63 | * Get the country's flag's CSS class |
||
64 | * |
||
65 | * @return string The URL to the country's flag |
||
66 | 1 | */ |
|
67 | private function getFlagCssClass() |
||
71 | |||
72 | /** |
||
73 | * Get a query builder for countries |
||
74 | * |
||
75 | * @throws Exception When no database is configured for BZiON |
||
76 | * |
||
77 | * @return QueryBuilderFlex |
||
78 | */ |
||
79 | public static function getQueryBuilder() |
||
85 | } |
||
86 |
This check looks for accesses to local static members using the fully qualified name instead of
self::
.While this is perfectly valid, the fully qualified name of
Certificate::TRIPLEDES_CBC
could just as well be replaced byself::TRIPLEDES_CBC
. Referencing local members withself::
assured the access will still work when the class is renamed, makes it perfectly clear that the member is in fact local and will usually be shorter.