1 | <?php |
||
14 | class EmbedResource |
||
15 | { |
||
16 | /** |
||
17 | * Embed result |
||
18 | * |
||
19 | * @var Adapter |
||
20 | */ |
||
21 | protected $embed; |
||
22 | |||
23 | public function __construct($url) |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Get width of this Embed |
||
31 | * |
||
32 | * @return int |
||
33 | */ |
||
34 | public function getWidth() |
||
38 | |||
39 | /** |
||
40 | * Get height of this Embed |
||
41 | * |
||
42 | * @return int |
||
43 | */ |
||
44 | public function getHeight() |
||
48 | |||
49 | public function getPreviewURL() |
||
65 | |||
66 | /** |
||
67 | * Get human readable name for this resource |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getName() |
||
79 | |||
80 | /** |
||
81 | * Get Embed type |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getType() |
||
89 | } |
||
90 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: