4 class Command_Reply extends Command_AbstractProps
6 public static function opts(\Console_CommandLine $optParser)
8 $cmd = $optParser->addCommand('reply');
9 static::addOptHtml($cmd);
10 static::optsGeneric($cmd);
15 'description' => 'URL that is replied to',
23 'description' => 'Reply text',
28 public function run(\Console_CommandLine_Result $cmdRes)
30 $url = Validator::url($cmdRes->args['url'], 'url');
35 $req = new Request($this->cfg->host, $this->cfg);
36 $req->setType('entry');
37 $req->addProperty('in-reply-to', $url);
38 $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);
40 $this->handleGenericOptions($cmdRes, $req);
43 $postUrl = $res->getHeader('Location');
44 Log::info('Reply created at server');