| 1 | <?php |
||
| 18 | class Img extends AbstractHelper |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * |
||
| 22 | * Returns an <img ... /> tag. |
||
| 23 | * |
||
| 24 | * If an "alt" attribute is not specified, will add it from the |
||
| 25 | * image basename. |
||
| 26 | * |
||
| 27 | * @param string $src The href to the image source. |
||
| 28 | * |
||
| 29 | * @param array $attr Additional attributes for the tag. |
||
| 30 | * |
||
| 31 | * @return string An <img ... /> tag. |
||
| 32 | * |
||
| 33 | * @todo Add automated height/width calculation? |
||
| 34 | * |
||
| 35 | */ |
||
| 36 | 1 | public function __invoke($src, array $attr = array()) |
|
| 49 | } |
||
| 50 |