コード例 #1
0
ファイル: MLPay.php プロジェクト: MaxLeap/SDK-MaxPay-PHP
 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);
 }
コード例 #2
0
ファイル: Console.php プロジェクト: jon9872/zend-framework
 /**
  * @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);
 }