| 1 | <?php |
||
| 13 | class Image implements Control |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * The url to the image |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $imageUrl; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The alternative text if image can not be found |
||
| 24 | * |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $alternateText; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Create a new image control |
||
| 31 | * |
||
| 32 | * @param string $imageUrl The url to the image |
||
| 33 | */ |
||
| 34 | 1 | public function __construct($imageUrl = '', $alternativeText = '') |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Set the image url |
||
| 42 | * |
||
| 43 | * @param string $imageUrl The url to set |
||
| 44 | */ |
||
| 45 | 1 | public function setImageUrl($imageUrl) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Set the alternative text |
||
| 52 | * |
||
| 53 | * @param string $text The text to set |
||
| 54 | */ |
||
| 55 | 1 | public function setAlternativeText($text) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * (non-PHPdoc) |
||
| 62 | * |
||
| 63 | * @see \Nkey\Caribu\Mvc\View\Control::render() |
||
| 64 | */ |
||
| 65 | 1 | public function render(Request $request, $parameters = array()) |
|
| 71 | } |
||
| 72 |