4 class Command_Undelete extends Command_AbstractProps
6 public static function opts(\Console_CommandLine $optParser)
8 $cmd = $optParser->addCommand('undelete');
9 $cmd->description = 'Restore a deleted post';
10 static::addOptJson($cmd);
15 'description' => 'URL to restore',
20 public function run(\Console_CommandLine_Result $cmdRes)
22 $url = Validator::url($cmdRes->args['url'], 'url');
27 $req = new Request($this->cfg->host, $this->cfg);
28 $this->handleOptJson($cmdRes, $req);
29 $req->setAction('undelete');
33 Log::info('Post restored at server');