5 * Create a object with a custom type
7 * @author Christian Weiske <cweiske@cweiske.de>
8 * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
9 * @link http://cweiske.de/shpub.htm
11 class Command_X extends Command_AbstractProps
13 public static function opts(\Console_CommandLine $optParser)
15 $cmd = $optParser->addCommand('x');
16 $cmd->description = 'Create a custom type';
17 static::addOptHtml($cmd);
18 static::optsGeneric($cmd);
24 'description' => 'Microformat object type',
29 public function run(\Console_CommandLine_Result $cmdRes)
31 $req = new Request($this->cfg->host, $this->cfg);
32 $req->setType($cmdRes->args['type']);
33 $this->handleGenericOptions($cmdRes, $req);
36 $postUrl = $res->getHeader('Location');
37 Log::info('Object created at server');