| 1 | <?php | ||
| 23 | class HeadCommand extends Command implements CommandInterface | ||
| 24 | { | ||
| 25 | /** | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | private $article; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Constructor. | ||
| 32 | * | ||
| 33 | * @param string $article | ||
| 34 | */ | ||
| 35 | 8 | public function __construct($article) | |
| 36 |     { | ||
| 37 | 8 | $this->article = $article; | |
| 38 | |||
| 39 | 8 | parent::__construct(true); | |
| 40 | 8 | } | |
| 41 | |||
| 42 | /** | ||
| 43 |      * {@inheritdoc} | ||
| 44 | */ | ||
| 45 | 1 | public function __invoke() | |
| 46 |     { | ||
| 47 | 1 |         return sprintf('HEAD %s', $this->article); | |
| 48 | } | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @return string | ||
| 52 | */ | ||
| 53 | 1 | public function onHeadFollows(MultiLineResponse $response) | |
| 57 | |||
| 58 | 1 | public function onNoNewsGroupCurrentSelected(Response $response) | |
| 59 |     { | ||
| 62 | |||
| 63 | 1 | public function onNoSuchArticleNumber(Response $response) | |
| 67 | |||
| 68 | 1 | public function onNoSuchArticleId(Response $response) | |
| 72 | } | ||
| 73 |