4 class Command_Undelete extends Command_AbstractProps
6 public static function opts(\Console_CommandLine $optParser)
8 $cmd = $optParser->addCommand('undelete');
9 static::addOptJson($cmd);
14 'description' => 'URL to restore',
19 public function run(\Console_CommandLine_Result $cmdRes)
21 $url = Validator::url($cmdRes->args['url'], 'url');
26 $req = new Request($this->cfg->host, $this->cfg);
27 $this->handleOptJson($cmdRes, $req);
28 $req->setAction('undelete');
32 Log::info('Post restored at server');