@@ -112,7 +112,7 @@ |
||
112 | 112 | |
113 | 113 | $map = static::getMap(); |
114 | 114 | |
115 | - return $map[ $api_code ] ?? null; |
|
115 | + return $map[$api_code] ?? null; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -10,56 +10,56 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | |
13 | - 'ok' => 'موفق', |
|
14 | - 'no_error_message' => 'خطای شماره :api_code', |
|
13 | + 'ok' => 'موفق', |
|
14 | + 'no_error_message' => 'خطای شماره :api_code', |
|
15 | 15 | |
16 | - // can be used by Exception Handler (if enabled) |
|
17 | - 'uncaught_exception' => 'استثناء مدیریت نشده :message', |
|
18 | - // we talking API call here, hence we have http_not_found |
|
19 | - 'http_exception' => 'استثناء HTTP :message', |
|
16 | + // can be used by Exception Handler (if enabled) |
|
17 | + 'uncaught_exception' => 'استثناء مدیریت نشده :message', |
|
18 | + // we talking API call here, hence we have http_not_found |
|
19 | + 'http_exception' => 'استثناء HTTP :message', |
|
20 | 20 | |
21 | - // HttpException handler (added in 6.4.0) |
|
22 | - // Error messages for HttpException caught w/o custom messages |
|
23 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
24 | - 'http_400' => 'Bad Request', |
|
25 | - 'http_401' => 'اجازه دسترسی ندارید', |
|
26 | - 'http_402' => 'Payment Required', |
|
27 | - 'http_403' => 'Forbidden', |
|
28 | - 'http_404' => 'Not Found', |
|
29 | - 'http_405' => 'Method Not Allowed', |
|
30 | - 'http_406' => 'Not Acceptable', |
|
31 | - 'http_407' => 'Proxy Authentication Required', |
|
32 | - 'http_408' => 'Request Timeout', |
|
33 | - 'http_409' => 'Conflict', |
|
34 | - 'http_410' => 'Gone', |
|
35 | - 'http_411' => 'Length Required', |
|
36 | - 'http_412' => 'Precondition Failed', |
|
37 | - 'http_413' => 'Payload Too Large', |
|
38 | - 'http_414' => 'URI Too Long', |
|
39 | - 'http_415' => 'Unsupported Media Type', |
|
40 | - 'http_416' => 'Range Not Satisfiable', |
|
41 | - 'http_417' => 'Expectation Failed', |
|
42 | - 'http_421' => 'Misdirected Request', |
|
43 | - 'http_422' => 'داده معتبر نیست', |
|
44 | - 'http_423' => 'Locked', |
|
45 | - 'http_424' => 'Failed Dependency', |
|
46 | - 'http_425' => 'Too Early', |
|
47 | - 'http_426' => 'Upgrade Required', |
|
48 | - 'http_428' => 'Precondition Required', |
|
49 | - 'http_429' => 'Too Many Requests', |
|
50 | - 'http_431' => 'Request Header Fields Too Large', |
|
51 | - 'http_451' => 'Unavailable For Legal Reasons', |
|
52 | - 'http_500' => 'Internal Server Error', |
|
53 | - 'http_501' => 'Not Implemented', |
|
54 | - 'http_502' => 'Bad Gateway', |
|
55 | - 'http_503' => 'Service Unavailable', |
|
56 | - 'http_504' => 'Gateway Timeout', |
|
57 | - 'http_505' => 'HTTP Version Not Supported', |
|
58 | - 'http_506' => 'Variant Also Negotiates', |
|
59 | - 'http_507' => 'Insufficient Storage', |
|
60 | - 'http_508' => 'Loop Detected', |
|
61 | - 'http_509' => 'Unassigned', |
|
62 | - 'http_510' => 'Not Extended', |
|
63 | - 'http_511' => 'Network Authentication Required', |
|
21 | + // HttpException handler (added in 6.4.0) |
|
22 | + // Error messages for HttpException caught w/o custom messages |
|
23 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
24 | + 'http_400' => 'Bad Request', |
|
25 | + 'http_401' => 'اجازه دسترسی ندارید', |
|
26 | + 'http_402' => 'Payment Required', |
|
27 | + 'http_403' => 'Forbidden', |
|
28 | + 'http_404' => 'Not Found', |
|
29 | + 'http_405' => 'Method Not Allowed', |
|
30 | + 'http_406' => 'Not Acceptable', |
|
31 | + 'http_407' => 'Proxy Authentication Required', |
|
32 | + 'http_408' => 'Request Timeout', |
|
33 | + 'http_409' => 'Conflict', |
|
34 | + 'http_410' => 'Gone', |
|
35 | + 'http_411' => 'Length Required', |
|
36 | + 'http_412' => 'Precondition Failed', |
|
37 | + 'http_413' => 'Payload Too Large', |
|
38 | + 'http_414' => 'URI Too Long', |
|
39 | + 'http_415' => 'Unsupported Media Type', |
|
40 | + 'http_416' => 'Range Not Satisfiable', |
|
41 | + 'http_417' => 'Expectation Failed', |
|
42 | + 'http_421' => 'Misdirected Request', |
|
43 | + 'http_422' => 'داده معتبر نیست', |
|
44 | + 'http_423' => 'Locked', |
|
45 | + 'http_424' => 'Failed Dependency', |
|
46 | + 'http_425' => 'Too Early', |
|
47 | + 'http_426' => 'Upgrade Required', |
|
48 | + 'http_428' => 'Precondition Required', |
|
49 | + 'http_429' => 'Too Many Requests', |
|
50 | + 'http_431' => 'Request Header Fields Too Large', |
|
51 | + 'http_451' => 'Unavailable For Legal Reasons', |
|
52 | + 'http_500' => 'Internal Server Error', |
|
53 | + 'http_501' => 'Not Implemented', |
|
54 | + 'http_502' => 'Bad Gateway', |
|
55 | + 'http_503' => 'Service Unavailable', |
|
56 | + 'http_504' => 'Gateway Timeout', |
|
57 | + 'http_505' => 'HTTP Version Not Supported', |
|
58 | + 'http_506' => 'Variant Also Negotiates', |
|
59 | + 'http_507' => 'Insufficient Storage', |
|
60 | + 'http_508' => 'Loop Detected', |
|
61 | + 'http_509' => 'Unassigned', |
|
62 | + 'http_510' => 'Not Extended', |
|
63 | + 'http_511' => 'Network Authentication Required', |
|
64 | 64 | ]; |
65 | 65 |
@@ -10,58 +10,58 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | |
13 | - 'ok' => 'OK', |
|
14 | - 'no_error_message' => 'Fehler #:api_code', |
|
13 | + 'ok' => 'OK', |
|
14 | + 'no_error_message' => 'Fehler #:api_code', |
|
15 | 15 | |
16 | - // Used by Exception Handler Helper (when used) |
|
17 | - 'uncaught_exception' => 'Ungefangene Ausnahme: :message', |
|
18 | - 'http_exception' => 'HTTP Ausnahme: :message', |
|
16 | + // Used by Exception Handler Helper (when used) |
|
17 | + 'uncaught_exception' => 'Ungefangene Ausnahme: :message', |
|
18 | + 'http_exception' => 'HTTP Ausnahme: :message', |
|
19 | 19 | |
20 | - // HttpException handler (added in 6.4.0) |
|
21 | - // Error messages for HttpException caught w/o custom messages |
|
22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | - // |
|
24 | - // German translation based on https://wiki.selfhtml.org/wiki/HTTP/Statuscodes |
|
25 | - 'http_400' => 'Ungültige Anfrage', |
|
26 | - 'http_401' => 'Unautorisiert', |
|
27 | - 'http_402' => 'Bezahlung benötigt', |
|
28 | - 'http_403' => 'Verboten', |
|
29 | - 'http_404' => 'Nicht gefunden', |
|
30 | - 'http_405' => 'Methode nicht erlaubt', |
|
31 | - 'http_406' => 'Nicht akzeptabel', |
|
32 | - 'http_407' => 'Proxy-Authentifizierung benötigt', |
|
33 | - 'http_408' => 'Anfrage-Zeitüberschreitung', |
|
34 | - 'http_409' => 'Konflikt', |
|
35 | - 'http_410' => 'Verschwunden', |
|
36 | - 'http_411' => 'Länge benötigt', |
|
37 | - 'http_412' => 'Vorbedingung missglückt', |
|
38 | - 'http_413' => 'Anfrage-Entität zu groß', |
|
39 | - 'http_414' => 'Anfrage-URI zu lang', |
|
40 | - 'http_415' => 'Nicht unterstützter Medientyp', |
|
41 | - 'http_416' => 'Anfrage-Bereich nicht erfüllbar', |
|
42 | - 'http_417' => 'Erwartung missglückt', |
|
43 | - 'http_421' => 'Fehlgeleitete Anforderung', |
|
44 | - 'http_422' => 'Kann nicht verarbeitet werden', |
|
45 | - 'http_423' => 'Gesperrt', |
|
46 | - 'http_424' => 'Vorhergehende Bedingung nicht erfüllt', |
|
47 | - 'http_425' => 'Too Early', // FIXME |
|
48 | - 'http_426' => 'Update benötigt', |
|
49 | - 'http_428' => ' Vorbedingung benötigt', |
|
50 | - 'http_429' => 'Zu viele Anfragen', |
|
51 | - 'http_431' => 'Headerfelds zu groß', |
|
52 | - 'http_451' => 'Ressource aus rechtlichen Gründen nicht verfügbar', |
|
20 | + // HttpException handler (added in 6.4.0) |
|
21 | + // Error messages for HttpException caught w/o custom messages |
|
22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | + // |
|
24 | + // German translation based on https://wiki.selfhtml.org/wiki/HTTP/Statuscodes |
|
25 | + 'http_400' => 'Ungültige Anfrage', |
|
26 | + 'http_401' => 'Unautorisiert', |
|
27 | + 'http_402' => 'Bezahlung benötigt', |
|
28 | + 'http_403' => 'Verboten', |
|
29 | + 'http_404' => 'Nicht gefunden', |
|
30 | + 'http_405' => 'Methode nicht erlaubt', |
|
31 | + 'http_406' => 'Nicht akzeptabel', |
|
32 | + 'http_407' => 'Proxy-Authentifizierung benötigt', |
|
33 | + 'http_408' => 'Anfrage-Zeitüberschreitung', |
|
34 | + 'http_409' => 'Konflikt', |
|
35 | + 'http_410' => 'Verschwunden', |
|
36 | + 'http_411' => 'Länge benötigt', |
|
37 | + 'http_412' => 'Vorbedingung missglückt', |
|
38 | + 'http_413' => 'Anfrage-Entität zu groß', |
|
39 | + 'http_414' => 'Anfrage-URI zu lang', |
|
40 | + 'http_415' => 'Nicht unterstützter Medientyp', |
|
41 | + 'http_416' => 'Anfrage-Bereich nicht erfüllbar', |
|
42 | + 'http_417' => 'Erwartung missglückt', |
|
43 | + 'http_421' => 'Fehlgeleitete Anforderung', |
|
44 | + 'http_422' => 'Kann nicht verarbeitet werden', |
|
45 | + 'http_423' => 'Gesperrt', |
|
46 | + 'http_424' => 'Vorhergehende Bedingung nicht erfüllt', |
|
47 | + 'http_425' => 'Too Early', // FIXME |
|
48 | + 'http_426' => 'Update benötigt', |
|
49 | + 'http_428' => ' Vorbedingung benötigt', |
|
50 | + 'http_429' => 'Zu viele Anfragen', |
|
51 | + 'http_431' => 'Headerfelds zu groß', |
|
52 | + 'http_451' => 'Ressource aus rechtlichen Gründen nicht verfügbar', |
|
53 | 53 | |
54 | - 'http_500' => 'Interner Server-Fehler', |
|
55 | - 'http_501' => 'Nicht implementiert', |
|
56 | - 'http_502' => 'Schlechtes Portal', |
|
57 | - 'http_503' => 'Dienst nicht verfügbar', |
|
58 | - 'http_504' => 'Portal-Auszeit', |
|
59 | - 'http_505' => 'HTTP-Version nicht unterstützt', |
|
60 | - 'http_506' => 'Variant Also Negotiates', // FIXME |
|
61 | - 'http_507' => 'Speicher des Servers reicht nicht aus', |
|
62 | - 'http_508' => 'Endlosschleife', |
|
63 | - 'http_509' => 'Unassigned', // FIXME |
|
64 | - 'http_510' => 'Zu wenig Informationen', |
|
65 | - 'http_511' => 'Identizifierung benötigt', |
|
54 | + 'http_500' => 'Interner Server-Fehler', |
|
55 | + 'http_501' => 'Nicht implementiert', |
|
56 | + 'http_502' => 'Schlechtes Portal', |
|
57 | + 'http_503' => 'Dienst nicht verfügbar', |
|
58 | + 'http_504' => 'Portal-Auszeit', |
|
59 | + 'http_505' => 'HTTP-Version nicht unterstützt', |
|
60 | + 'http_506' => 'Variant Also Negotiates', // FIXME |
|
61 | + 'http_507' => 'Speicher des Servers reicht nicht aus', |
|
62 | + 'http_508' => 'Endlosschleife', |
|
63 | + 'http_509' => 'Unassigned', // FIXME |
|
64 | + 'http_510' => 'Zu wenig Informationen', |
|
65 | + 'http_511' => 'Identizifierung benötigt', |
|
66 | 66 | ]; |
67 | 67 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'http_422' => 'Kann nicht verarbeitet werden', |
45 | 45 | 'http_423' => 'Gesperrt', |
46 | 46 | 'http_424' => 'Vorhergehende Bedingung nicht erfüllt', |
47 | - 'http_425' => 'Too Early', // FIXME |
|
47 | + 'http_425' => 'Too Early', // FIXME |
|
48 | 48 | 'http_426' => 'Update benötigt', |
49 | 49 | 'http_428' => ' Vorbedingung benötigt', |
50 | 50 | 'http_429' => 'Zu viele Anfragen', |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | 'http_503' => 'Dienst nicht verfügbar', |
58 | 58 | 'http_504' => 'Portal-Auszeit', |
59 | 59 | 'http_505' => 'HTTP-Version nicht unterstützt', |
60 | - 'http_506' => 'Variant Also Negotiates', // FIXME |
|
60 | + 'http_506' => 'Variant Also Negotiates', // FIXME |
|
61 | 61 | 'http_507' => 'Speicher des Servers reicht nicht aus', |
62 | 62 | 'http_508' => 'Endlosschleife', |
63 | - 'http_509' => 'Unassigned', // FIXME |
|
63 | + 'http_509' => 'Unassigned', // FIXME |
|
64 | 64 | 'http_510' => 'Zu wenig Informationen', |
65 | 65 | 'http_511' => 'Identizifierung benötigt', |
66 | 66 | ]; |
@@ -10,56 +10,56 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | |
13 | - 'ok' => 'OK', |
|
14 | - 'no_error_message' => 'Error #:api_code', |
|
13 | + 'ok' => 'OK', |
|
14 | + 'no_error_message' => 'Error #:api_code', |
|
15 | 15 | |
16 | - // Used by Exception Handler Helper (when used) |
|
17 | - 'uncaught_exception' => 'Uncaught exception: :message', |
|
18 | - 'http_exception' => 'HTTP exception: :message', |
|
16 | + // Used by Exception Handler Helper (when used) |
|
17 | + 'uncaught_exception' => 'Uncaught exception: :message', |
|
18 | + 'http_exception' => 'HTTP exception: :message', |
|
19 | 19 | |
20 | - // HttpException handler (added in 6.4.0) |
|
21 | - // Error messages for HttpException caught w/o custom messages |
|
22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | - 'http_400' => 'Bad Request', |
|
24 | - 'http_401' => 'Unauthorized', |
|
25 | - 'http_402' => 'Payment Required', |
|
26 | - 'http_403' => 'Forbidden', |
|
27 | - 'http_404' => 'Not Found', |
|
28 | - 'http_405' => 'Method Not Allowed', |
|
29 | - 'http_406' => 'Not Acceptable', |
|
30 | - 'http_407' => 'Proxy Authentication Required', |
|
31 | - 'http_408' => 'Request Timeout', |
|
32 | - 'http_409' => 'Conflict', |
|
33 | - 'http_410' => 'Gone', |
|
34 | - 'http_411' => 'Length Required', |
|
35 | - 'http_412' => 'Precondition Failed', |
|
36 | - 'http_413' => 'Payload Too Large', |
|
37 | - 'http_414' => 'URI Too Long', |
|
38 | - 'http_415' => 'Unsupported Media Type', |
|
39 | - 'http_416' => 'Range Not Satisfiable', |
|
40 | - 'http_417' => 'Expectation Failed', |
|
41 | - 'http_421' => 'Misdirected Request', |
|
42 | - 'http_422' => 'Unprocessable Entity', |
|
43 | - 'http_423' => 'Locked', |
|
44 | - 'http_424' => 'Failed Dependency', |
|
45 | - 'http_425' => 'Too Early', |
|
46 | - 'http_426' => 'Upgrade Required', |
|
47 | - 'http_428' => 'Precondition Required', |
|
48 | - 'http_429' => 'Too Many Requests', |
|
49 | - 'http_431' => 'Request Header Fields Too Large', |
|
50 | - 'http_451' => 'Unavailable For Legal Reasons', |
|
20 | + // HttpException handler (added in 6.4.0) |
|
21 | + // Error messages for HttpException caught w/o custom messages |
|
22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | + 'http_400' => 'Bad Request', |
|
24 | + 'http_401' => 'Unauthorized', |
|
25 | + 'http_402' => 'Payment Required', |
|
26 | + 'http_403' => 'Forbidden', |
|
27 | + 'http_404' => 'Not Found', |
|
28 | + 'http_405' => 'Method Not Allowed', |
|
29 | + 'http_406' => 'Not Acceptable', |
|
30 | + 'http_407' => 'Proxy Authentication Required', |
|
31 | + 'http_408' => 'Request Timeout', |
|
32 | + 'http_409' => 'Conflict', |
|
33 | + 'http_410' => 'Gone', |
|
34 | + 'http_411' => 'Length Required', |
|
35 | + 'http_412' => 'Precondition Failed', |
|
36 | + 'http_413' => 'Payload Too Large', |
|
37 | + 'http_414' => 'URI Too Long', |
|
38 | + 'http_415' => 'Unsupported Media Type', |
|
39 | + 'http_416' => 'Range Not Satisfiable', |
|
40 | + 'http_417' => 'Expectation Failed', |
|
41 | + 'http_421' => 'Misdirected Request', |
|
42 | + 'http_422' => 'Unprocessable Entity', |
|
43 | + 'http_423' => 'Locked', |
|
44 | + 'http_424' => 'Failed Dependency', |
|
45 | + 'http_425' => 'Too Early', |
|
46 | + 'http_426' => 'Upgrade Required', |
|
47 | + 'http_428' => 'Precondition Required', |
|
48 | + 'http_429' => 'Too Many Requests', |
|
49 | + 'http_431' => 'Request Header Fields Too Large', |
|
50 | + 'http_451' => 'Unavailable For Legal Reasons', |
|
51 | 51 | |
52 | - 'http_500' => 'Internal Server Error', |
|
53 | - 'http_501' => 'Not Implemented', |
|
54 | - 'http_502' => 'Bad Gateway', |
|
55 | - 'http_503' => 'Service Unavailable', |
|
56 | - 'http_504' => 'Gateway Timeout', |
|
57 | - 'http_505' => 'HTTP Version Not Supported', |
|
58 | - 'http_506' => 'Variant Also Negotiates', |
|
59 | - 'http_507' => 'Insufficient Storage', |
|
60 | - 'http_508' => 'Loop Detected', |
|
61 | - 'http_509' => 'Unassigned', |
|
62 | - 'http_510' => 'Not Extended', |
|
63 | - 'http_511' => 'Network Authentication Required', |
|
52 | + 'http_500' => 'Internal Server Error', |
|
53 | + 'http_501' => 'Not Implemented', |
|
54 | + 'http_502' => 'Bad Gateway', |
|
55 | + 'http_503' => 'Service Unavailable', |
|
56 | + 'http_504' => 'Gateway Timeout', |
|
57 | + 'http_505' => 'HTTP Version Not Supported', |
|
58 | + 'http_506' => 'Variant Also Negotiates', |
|
59 | + 'http_507' => 'Insufficient Storage', |
|
60 | + 'http_508' => 'Loop Detected', |
|
61 | + 'http_509' => 'Unassigned', |
|
62 | + 'http_510' => 'Not Extended', |
|
63 | + 'http_511' => 'Network Authentication Required', |
|
64 | 64 | ]; |
65 | 65 |
@@ -10,55 +10,55 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | |
13 | - 'ok' => 'OK', |
|
14 | - 'no_error_message' => 'Błąd #:api_code', |
|
13 | + 'ok' => 'OK', |
|
14 | + 'no_error_message' => 'Błąd #:api_code', |
|
15 | 15 | |
16 | - // Used by Exception Handler Helper (when used) |
|
17 | - 'uncaught_exception' => 'Nieprzechwycony wyjątek: :message', |
|
18 | - 'http_exception' => 'Wyjątek HTTP: :message', |
|
16 | + // Used by Exception Handler Helper (when used) |
|
17 | + 'uncaught_exception' => 'Nieprzechwycony wyjątek: :message', |
|
18 | + 'http_exception' => 'Wyjątek HTTP: :message', |
|
19 | 19 | |
20 | - // HttpException handler (added in 6.4.0) |
|
21 | - // Error messages for HttpException caught w/o custom messages |
|
22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | - 'http_400' => 'Bad Request', |
|
24 | - 'http_401' => 'Unauthorized', |
|
25 | - 'http_402' => 'Payment Required', |
|
26 | - 'http_403' => 'Forbidden', |
|
27 | - 'http_404' => 'Not Found', |
|
28 | - 'http_405' => 'Method Not Allowed', |
|
29 | - 'http_406' => 'Not Acceptable', |
|
30 | - 'http_407' => 'Proxy Authentication Required', |
|
31 | - 'http_408' => 'Request Timeout', |
|
32 | - 'http_409' => 'Conflict', |
|
33 | - 'http_410' => 'Gone', |
|
34 | - 'http_411' => 'Length Required', |
|
35 | - 'http_412' => 'Precondition Failed', |
|
36 | - 'http_413' => 'Payload Too Large', |
|
37 | - 'http_414' => 'URI Too Long', |
|
38 | - 'http_415' => 'Unsupported Media Type', |
|
39 | - 'http_416' => 'Range Not Satisfiable', |
|
40 | - 'http_417' => 'Expectation Failed', |
|
41 | - 'http_421' => 'Misdirected Request', |
|
42 | - 'http_422' => 'Unprocessable Entity', |
|
43 | - 'http_423' => 'Locked', |
|
44 | - 'http_424' => 'Failed Dependency', |
|
45 | - 'http_425' => 'Too Early', |
|
46 | - 'http_426' => 'Upgrade Required', |
|
47 | - 'http_428' => 'Precondition Required', |
|
48 | - 'http_429' => 'Too Many Requests', |
|
49 | - 'http_431' => 'Request Header Fields Too Large', |
|
50 | - 'http_451' => 'Unavailable For Legal Reasons', |
|
20 | + // HttpException handler (added in 6.4.0) |
|
21 | + // Error messages for HttpException caught w/o custom messages |
|
22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | + 'http_400' => 'Bad Request', |
|
24 | + 'http_401' => 'Unauthorized', |
|
25 | + 'http_402' => 'Payment Required', |
|
26 | + 'http_403' => 'Forbidden', |
|
27 | + 'http_404' => 'Not Found', |
|
28 | + 'http_405' => 'Method Not Allowed', |
|
29 | + 'http_406' => 'Not Acceptable', |
|
30 | + 'http_407' => 'Proxy Authentication Required', |
|
31 | + 'http_408' => 'Request Timeout', |
|
32 | + 'http_409' => 'Conflict', |
|
33 | + 'http_410' => 'Gone', |
|
34 | + 'http_411' => 'Length Required', |
|
35 | + 'http_412' => 'Precondition Failed', |
|
36 | + 'http_413' => 'Payload Too Large', |
|
37 | + 'http_414' => 'URI Too Long', |
|
38 | + 'http_415' => 'Unsupported Media Type', |
|
39 | + 'http_416' => 'Range Not Satisfiable', |
|
40 | + 'http_417' => 'Expectation Failed', |
|
41 | + 'http_421' => 'Misdirected Request', |
|
42 | + 'http_422' => 'Unprocessable Entity', |
|
43 | + 'http_423' => 'Locked', |
|
44 | + 'http_424' => 'Failed Dependency', |
|
45 | + 'http_425' => 'Too Early', |
|
46 | + 'http_426' => 'Upgrade Required', |
|
47 | + 'http_428' => 'Precondition Required', |
|
48 | + 'http_429' => 'Too Many Requests', |
|
49 | + 'http_431' => 'Request Header Fields Too Large', |
|
50 | + 'http_451' => 'Unavailable For Legal Reasons', |
|
51 | 51 | |
52 | - 'http_500' => 'Internal Server Error', |
|
53 | - 'http_501' => 'Not Implemented', |
|
54 | - 'http_502' => 'Bad Gateway', |
|
55 | - 'http_503' => 'Service Unavailable', |
|
56 | - 'http_504' => 'Gateway Timeout', |
|
57 | - 'http_505' => 'HTTP Version Not Supported', |
|
58 | - 'http_506' => 'Variant Also Negotiates', |
|
59 | - 'http_507' => 'Insufficient Storage', |
|
60 | - 'http_508' => 'Loop Detected', |
|
61 | - 'http_509' => 'Unassigned', |
|
62 | - 'http_510' => 'Not Extended', |
|
63 | - 'http_511' => 'Network Authentication Required', |
|
52 | + 'http_500' => 'Internal Server Error', |
|
53 | + 'http_501' => 'Not Implemented', |
|
54 | + 'http_502' => 'Bad Gateway', |
|
55 | + 'http_503' => 'Service Unavailable', |
|
56 | + 'http_504' => 'Gateway Timeout', |
|
57 | + 'http_505' => 'HTTP Version Not Supported', |
|
58 | + 'http_506' => 'Variant Also Negotiates', |
|
59 | + 'http_507' => 'Insufficient Storage', |
|
60 | + 'http_508' => 'Loop Detected', |
|
61 | + 'http_509' => 'Unassigned', |
|
62 | + 'http_510' => 'Not Extended', |
|
63 | + 'http_511' => 'Network Authentication Required', |
|
64 | 64 | ]; |
@@ -15,14 +15,14 @@ |
||
15 | 15 | */ |
16 | 16 | interface ConverterContract |
17 | 17 | { |
18 | - /** |
|
19 | - * Returns array representation of the object. |
|
20 | - * |
|
21 | - * @param object $obj Object to be converted |
|
22 | - * @param array $config Converter config array to be used for this object (based on exact class |
|
23 | - * name match or inheritance). |
|
24 | - * |
|
25 | - * @return array |
|
26 | - */ |
|
27 | - public function convert(object $obj, array $config): array; |
|
18 | + /** |
|
19 | + * Returns array representation of the object. |
|
20 | + * |
|
21 | + * @param object $obj Object to be converted |
|
22 | + * @param array $config Converter config array to be used for this object (based on exact class |
|
23 | + * name match or inheritance). |
|
24 | + * |
|
25 | + * @return array |
|
26 | + */ |
|
27 | + public function convert(object $obj, array $config): array; |
|
28 | 28 | } |
@@ -132,7 +132,7 @@ |
||
132 | 132 | * @throws \InvalidArgumentException |
133 | 133 | */ |
134 | 134 | public static function assertIsType(string $var_name, $value, array $allowed_types, |
135 | - string $ex_class = Ex\InvalidTypeException::class): void |
|
135 | + string $ex_class = Ex\InvalidTypeException::class): void |
|
136 | 136 | { |
137 | 137 | $type = \gettype($value); |
138 | 138 | if (!\in_array($type, $allowed_types, true)) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $worker = new $cfg[ RB::KEY_HANDLER ](); |
148 | 148 | $result = $worker->convert($data, $cfg); |
149 | 149 | $result = $cfg[ RB::KEY_KEY ] === null ? $result : [$cfg[ RB::KEY_KEY ] => $result]; |
150 | - } |
|
150 | + } |
|
151 | 151 | |
152 | 152 | if ($result === null && \is_array($data)) { |
153 | 153 | $cfg = $this->getPrimitiveMappingConfigOrThrow($data); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | "Missing '{$key_name}' entry in '{$class_name}' class mapping config."); |
226 | 226 | } |
227 | 227 | |
228 | - Validator::assertIsType(RB::KEY_KEY, $class_config[$key_name], $allowed_types); |
|
228 | + Validator::assertIsType(RB::KEY_KEY, $class_config[$key_name], $allowed_types); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | protected function getPrimitiveMappingConfigOrThrow($data): array |
63 | 63 | { |
64 | 64 | $type = \gettype($data); |
65 | - $result = $this->primitives[ $type ] ?? null; |
|
65 | + $result = $this->primitives[$type] ?? null; |
|
66 | 66 | |
67 | 67 | if ($result === null) { |
68 | 68 | throw new Ex\ConfigurationNotFoundException( |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | $cls = \get_class($data); |
95 | 95 | if (\is_string($cls)) { |
96 | 96 | if (\array_key_exists($cls, $this->classes)) { |
97 | - $result = $this->classes[ $cls ]; |
|
97 | + $result = $this->classes[$cls]; |
|
98 | 98 | $debug_result = 'exact config match'; |
99 | 99 | } else { |
100 | 100 | // no exact match, then lets try with `instanceof` |
101 | 101 | foreach (\array_keys($this->classes) as $class_name) { |
102 | 102 | if ($data instanceof $class_name) { |
103 | - $result = $this->classes[ $class_name ]; |
|
103 | + $result = $this->classes[$class_name]; |
|
104 | 104 | $debug_result = "subclass of {$class_name}"; |
105 | 105 | break; |
106 | 106 | } |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | |
150 | 150 | if ($result === null && \is_object($data)) { |
151 | 151 | $cfg = $this->getClassMappingConfigOrThrow($data); |
152 | - $worker = new $cfg[ RB::KEY_HANDLER ](); |
|
152 | + $worker = new $cfg[RB::KEY_HANDLER](); |
|
153 | 153 | $result = $worker->convert($data, $cfg); |
154 | - $result = $cfg[ RB::KEY_KEY ] === null ? $result : [$cfg[ RB::KEY_KEY ] => $result]; |
|
154 | + $result = $cfg[RB::KEY_KEY] === null ? $result : [$cfg[RB::KEY_KEY] => $result]; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($result === null && \is_array($data)) { |
@@ -159,12 +159,12 @@ discard block |
||
159 | 159 | |
160 | 160 | $result = $this->convertArray($data); |
161 | 161 | if (!Util::isArrayWithNonNumericKeys($data)) { |
162 | - $result = [$cfg[ RB::KEY_KEY ] => $result]; |
|
162 | + $result = [$cfg[RB::KEY_KEY] => $result]; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
166 | 166 | if (\is_bool($data) || \is_float($data) || \is_int($data) || \is_string($data)) { |
167 | - $result = [$this->getPrimitiveMappingConfigOrThrow($data)[ RB::KEY_KEY ] => $data]; |
|
167 | + $result = [$this->getPrimitiveMappingConfigOrThrow($data)[RB::KEY_KEY] => $data]; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | return $result; |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | |
188 | 188 | foreach ($data as $key => $val) { |
189 | 189 | if (\is_array($val)) { |
190 | - $data[ $key ] = $this->convertArray($val); |
|
190 | + $data[$key] = $this->convertArray($val); |
|
191 | 191 | } elseif (\is_object($val)) { |
192 | 192 | $cfg = $this->getClassMappingConfigOrThrow($val); |
193 | - $worker = new $cfg[ RB::KEY_HANDLER ](); |
|
193 | + $worker = new $cfg[RB::KEY_HANDLER](); |
|
194 | 194 | $converted_data = $worker->convert($val, $cfg); |
195 | - $data[ $key ] = $converted_data; |
|
195 | + $data[$key] = $converted_data; |
|
196 | 196 | } |
197 | 197 | } |
198 | 198 |
@@ -10,57 +10,57 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | |
13 | - 'ok' => 'Tamam', |
|
14 | - 'no_error_message' => 'Hata #:api_code', |
|
13 | + 'ok' => 'Tamam', |
|
14 | + 'no_error_message' => 'Hata #:api_code', |
|
15 | 15 | |
16 | - // Used by Exception Handler Helper (when used) |
|
17 | - 'uncaught_exception' => 'Yakalanmamış Hata: :message', |
|
18 | - 'http_exception' => 'HTTP Hatası: :message', |
|
16 | + // Used by Exception Handler Helper (when used) |
|
17 | + 'uncaught_exception' => 'Yakalanmamış Hata: :message', |
|
18 | + 'http_exception' => 'HTTP Hatası: :message', |
|
19 | 19 | |
20 | - // HttpException handler (added in 6.4.0) |
|
21 | - // Error messages for HttpException caught w/o custom messages |
|
22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | - // Turkish Translated from https://tr.wikipedia.org/wiki/HTTP_durum_kodlar%C4%B1 |
|
24 | - 'http_400' => 'Kötü İstek', |
|
25 | - 'http_401' => 'Yetkisiz', |
|
26 | - 'http_402' => 'Ödeme Gerekli', |
|
27 | - 'http_403' => 'Yasaklandı', |
|
28 | - 'http_404' => 'Sayfa Bulunamadı', |
|
29 | - 'http_405' => 'İzin Verilmeyen Metod', |
|
30 | - 'http_406' => 'Kabul Edilemez', |
|
31 | - 'http_407' => 'Proxy Sunucusunda Giriş Yapmak Gerekli', |
|
32 | - 'http_408' => 'İstek Zaman Aşamına Uğradı', |
|
33 | - 'http_409' => 'Çakışma', |
|
34 | - 'http_410' => 'Bak', |
|
35 | - 'http_411' => 'Uzunluk Gerekli', |
|
36 | - 'http_412' => 'Ön Koşul Başarısız', |
|
37 | - 'http_413' => 'Girilen Veri Çok Fazla', |
|
38 | - 'http_414' => 'URI Çok Uzun', |
|
39 | - 'http_415' => 'Desteklenmeyen Medya Tipi', |
|
40 | - 'http_416' => 'İstenen Aralık Kabul Edilemez', |
|
41 | - 'http_417' => 'Beklenti Başarısız', |
|
42 | - 'http_421' => 'Yanlış Yönlendirilmiş Talep', |
|
43 | - 'http_422' => 'İşlenemeyen Varlık', |
|
44 | - 'http_423' => 'Kilitli', |
|
45 | - 'http_424' => 'Başarısız Bağımlılık', |
|
46 | - 'http_425' => 'Çok Erken', |
|
47 | - 'http_426' => 'Güncelleme Gerekli', |
|
48 | - 'http_428' => 'Ön Koşul Gerekli', |
|
49 | - 'http_429' => 'Çok Fazla İstek Gönderildi', |
|
50 | - 'http_431' => 'İstek Başlık Alanları Çok Büyük', |
|
51 | - 'http_451' => 'Yasal Nedenlerle Gösterilemiyor', |
|
20 | + // HttpException handler (added in 6.4.0) |
|
21 | + // Error messages for HttpException caught w/o custom messages |
|
22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
23 | + // Turkish Translated from https://tr.wikipedia.org/wiki/HTTP_durum_kodlar%C4%B1 |
|
24 | + 'http_400' => 'Kötü İstek', |
|
25 | + 'http_401' => 'Yetkisiz', |
|
26 | + 'http_402' => 'Ödeme Gerekli', |
|
27 | + 'http_403' => 'Yasaklandı', |
|
28 | + 'http_404' => 'Sayfa Bulunamadı', |
|
29 | + 'http_405' => 'İzin Verilmeyen Metod', |
|
30 | + 'http_406' => 'Kabul Edilemez', |
|
31 | + 'http_407' => 'Proxy Sunucusunda Giriş Yapmak Gerekli', |
|
32 | + 'http_408' => 'İstek Zaman Aşamına Uğradı', |
|
33 | + 'http_409' => 'Çakışma', |
|
34 | + 'http_410' => 'Bak', |
|
35 | + 'http_411' => 'Uzunluk Gerekli', |
|
36 | + 'http_412' => 'Ön Koşul Başarısız', |
|
37 | + 'http_413' => 'Girilen Veri Çok Fazla', |
|
38 | + 'http_414' => 'URI Çok Uzun', |
|
39 | + 'http_415' => 'Desteklenmeyen Medya Tipi', |
|
40 | + 'http_416' => 'İstenen Aralık Kabul Edilemez', |
|
41 | + 'http_417' => 'Beklenti Başarısız', |
|
42 | + 'http_421' => 'Yanlış Yönlendirilmiş Talep', |
|
43 | + 'http_422' => 'İşlenemeyen Varlık', |
|
44 | + 'http_423' => 'Kilitli', |
|
45 | + 'http_424' => 'Başarısız Bağımlılık', |
|
46 | + 'http_425' => 'Çok Erken', |
|
47 | + 'http_426' => 'Güncelleme Gerekli', |
|
48 | + 'http_428' => 'Ön Koşul Gerekli', |
|
49 | + 'http_429' => 'Çok Fazla İstek Gönderildi', |
|
50 | + 'http_431' => 'İstek Başlık Alanları Çok Büyük', |
|
51 | + 'http_451' => 'Yasal Nedenlerle Gösterilemiyor', |
|
52 | 52 | |
53 | - 'http_500' => 'Dahili Sunucu Hatası', |
|
54 | - 'http_501' => 'Uygulanamadı', |
|
55 | - 'http_502' => 'Hatalı Ağ Geçidi', |
|
56 | - 'http_503' => 'Hizmet Kullanılamıyor', |
|
57 | - 'http_504' => 'Ağ Geçidi Zaman Aşımı', |
|
58 | - 'http_505' => 'HTTP Versiyonu Desteklenmiyor', |
|
59 | - 'http_506' => 'Varyant Ayrıca Müzakere Ediyor', |
|
60 | - 'http_507' => 'Yetersiz Depolama Alanı', |
|
61 | - 'http_508' => 'Döngü Algılandı', |
|
62 | - 'http_509' => 'Atanmamış', |
|
63 | - 'http_510' => 'Uzatılmamış', |
|
64 | - 'http_511' => 'Ağ Kimlik Doğrulaması Gerekli', |
|
53 | + 'http_500' => 'Dahili Sunucu Hatası', |
|
54 | + 'http_501' => 'Uygulanamadı', |
|
55 | + 'http_502' => 'Hatalı Ağ Geçidi', |
|
56 | + 'http_503' => 'Hizmet Kullanılamıyor', |
|
57 | + 'http_504' => 'Ağ Geçidi Zaman Aşımı', |
|
58 | + 'http_505' => 'HTTP Versiyonu Desteklenmiyor', |
|
59 | + 'http_506' => 'Varyant Ayrıca Müzakere Ediyor', |
|
60 | + 'http_507' => 'Yetersiz Depolama Alanı', |
|
61 | + 'http_508' => 'Döngü Algılandı', |
|
62 | + 'http_509' => 'Atanmamış', |
|
63 | + 'http_510' => 'Uzatılmamış', |
|
64 | + 'http_511' => 'Ağ Kimlik Doğrulaması Gerekli', |
|
65 | 65 | ]; |
66 | 66 |