| 1 | <?php |
||
| 4 | class ImageHelper |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * Returns a absolute url from the image directory |
||
| 8 | * |
||
| 9 | * @param $name |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | function get($name) |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Returns a relative url from the image directory |
||
| 19 | * |
||
| 20 | * @param $name |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | function fetch($name) |
||
| 27 | |||
| 28 | function display($name) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Returns svg code for SVG injection in the DOM from the uploads directory |
||
| 35 | * |
||
| 36 | * @param $imageObject TimberImage Instance |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | function embedTimberSVG($imageObject) |
||
| 51 | } |
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.