| 1 | <?php |
||
| 5 | class Input |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The image URL. |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $url; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Instantiate a new input from an url. |
||
| 15 | * |
||
| 16 | * @param string $url The image URL. |
||
| 17 | * @return Input |
||
| 18 | */ |
||
| 19 | 5 | public static function fromUrl($url) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Get the image URL. |
||
| 29 | * |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 1 | public function getUrl() |
|
| 36 | |||
| 37 | 5 | public function setUrl($url) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Format the input for querying the Clarifai API. |
||
| 46 | * |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | 4 | public function format() |
|
| 59 | } |
||
| 60 |