1 | <?php |
||
2 | // Compatibility shim for hooking up jimIcon to Tiny Tiny RSS. |
||
3 | |||
4 | require_once "jimIcon.php"; |
||
5 | |||
6 | class floIconIcon { |
||
7 | function getImageResource() { |
||
0 ignored issues
–
show
|
|||
8 | return $this->img; |
||
0 ignored issues
–
show
|
|||
9 | } |
||
10 | } |
||
11 | |||
12 | class floIcon { |
||
13 | function readICO($file) { |
||
0 ignored issues
–
show
|
|||
14 | $jim = new jimIcon(); |
||
15 | $icon = new floIconIcon(); |
||
16 | $icon->img = $jim->fromiconstring(file_get_contents($file)); |
||
0 ignored issues
–
show
|
|||
17 | $this->images = array($icon); |
||
0 ignored issues
–
show
|
|||
18 | } |
||
19 | } |
||
20 | ?> |
||
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. ![]() |
|||
21 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.