4 class Command_Note extends Command_AbstractProps
6 public static function opts(\Console_CommandLine $optParser)
8 $cmd = $optParser->addCommand('note');
9 static::addOptHtml($cmd);
10 static::optsGeneric($cmd);
16 'description' => 'Post text',
21 public function run(\Console_CommandLine_Result $cmdRes)
23 $req = new Request($this->cfg->host, $this->cfg);
24 $req->setType('entry');
25 $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);
26 $this->handleGenericOptions($cmdRes, $req);
29 $postUrl = $res->getHeader('Location');
30 Log::info('Post created at server');