1 | <?php |
||
3 | class ClassyImage extends ClassyBasis { |
||
|
|||
4 | |||
5 | /** |
||
6 | * Current image id |
||
7 | * @var int |
||
8 | */ |
||
9 | public $ID; |
||
10 | |||
11 | /** |
||
12 | * Main constructor function. Requires image id |
||
13 | * @param int $pid |
||
14 | */ |
||
15 | public function __construct( $pid = null ) { |
||
28 | |||
29 | /** |
||
30 | * Returns default image url |
||
31 | * @return string |
||
32 | */ |
||
33 | public static function get_default_image() { |
||
39 | |||
40 | /** |
||
41 | * Returns image url. In case image ID is 0 or not set returns default image |
||
42 | * @param string $size |
||
43 | * @return string |
||
44 | */ |
||
45 | public function src( $size = 'medium' ) { |
||
59 | } |
||
60 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.