| 1 | <?php |
||
| 10 | class AnswersOfIdsCommand |
||
| 11 | { |
||
| 12 | const URL = '/answers/%s'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The API URL. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $url; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Array that contains StackExchange API params. |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | private $params; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Constructor. |
||
| 30 | * |
||
| 31 | * @param array|string $id The answer id. Also, it can be multiple ids separated by semicolon. |
||
| 32 | * @param array $params Array that contains StackExchange API params |
||
| 33 | */ |
||
| 34 | public function __construct($id, array $params = ['site' => 'stackoverflow']) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * The API URL. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function url() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Gets the params. |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function params() |
||
| 67 | } |
||
| 68 |