初始化代码
This commit is contained in:
28
app/Common/extend/tenxunyunimage/QcloudImage/Error.php
Normal file
28
app/Common/extend/tenxunyunimage/QcloudImage/Error.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Error defination.
|
||||
*/
|
||||
namespace QcloudImage;
|
||||
|
||||
class Error {
|
||||
|
||||
/**
|
||||
* Create reusable signature.
|
||||
* This signature will expire at time()+$howlong timestamp.
|
||||
* Return the signature on success.
|
||||
* Return false on fail.
|
||||
*/
|
||||
public static function json($code, $message, $httpcode = 0) {
|
||||
return json_encode(array(
|
||||
'code' => $code,
|
||||
'message' => $message,
|
||||
'httpcode' => $httpcode,
|
||||
'data' => json_decode('{}',true)
|
||||
));
|
||||
}
|
||||
|
||||
public static $Param = -1;
|
||||
public static $Network = -2;
|
||||
public static $FilePath = -3;
|
||||
public static $Unknown = -4;
|
||||
}
|
||||
Reference in New Issue
Block a user