| 1 | <?php |
||
| 19 | class AnswersOfIdsCommand |
||
| 20 | { |
||
| 21 | const URL = '/answers/%s'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The API URL. |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $url; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Array that contains StackExchange API params. |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | private $params; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Constructor. |
||
| 39 | * |
||
| 40 | * @param array|string $id The answer id. Also, it can be multiple ids separated by semicolon. |
||
| 41 | * @param array $params Array that contains StackExchange API params |
||
| 42 | */ |
||
| 43 | public function __construct($id, array $params = ['site' => 'stackoverflow']) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * The API URL. |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function url() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Gets the params. |
||
| 69 | * |
||
| 70 | * @return array |
||
| 71 | */ |
||
| 72 | public function params() |
||
| 76 | } |
||
| 77 |