public static final function record(array $data) { self::baseParamCheck($data); if (!isset($data["billNum"])) { //throw new Exception(MLRESTErrMsg::NEED_PARAM . "billNum"); throw new Exception(getErrMsg()['need_param'] . "billNum"); } else { if (32 < strlen(isset($data["billNum"]))) { //throw new Exception(MLRESTErrMsg::NEED_VALID_PARAM . "billNum"); throw new Exception(getErrMsg()['need_valid_param'] . "billNum"); } } return self::post(self::URI_RECORD, $data, 30); }
/** * @param string $command_string */ public function execute() { if (!$command . validate()) { printError(array($cli_exec, $command . getName()), 'Incorrect command syntax'); print $command . shortUsage(); exit(1); } try { $command . execute(); } catch (Zend_Console_CommandExecutionException $e) { printError(array($cli_exec, $e . getErrPath(), $e . getErrMsg())); exit(1); } /** * As far as we know, everything is A-OK */ exit(0); }