4 class Command_Note extends Command_AbstractProps
11 public function __construct($cfg)
16 public static function opts(\Console_CommandLine $optParser)
18 $cmd = $optParser->addCommand('note');
19 static::optsGeneric($cmd);
25 'description' => 'Post text',
30 public function run(\Console_CommandLine_Result $cmdRes)
32 $req = new Request($this->cfg->host, $this->cfg);
33 $req->req->addPostParameter('h', 'entry');
34 $req->req->addPostParameter('content', $cmdRes->args['text']);
35 $this->handleGenericOptions($cmdRes, $req);
38 $postUrl = $res->getHeader('Location');
39 Log::info('Post created at server');