|
3 | 3 | namespace App\Helpers\MetaFormats;
|
4 | 4 |
|
5 | 5 | use App\Exceptions\InternalServerException;
|
| 6 | +use App\Helpers\MetaFormats\Attributes\FFile; |
| 7 | +use App\Helpers\MetaFormats\Attributes\File; |
6 | 8 | use App\Helpers\MetaFormats\Attributes\Format;
|
7 | 9 | use App\Helpers\MetaFormats\Attributes\FormatParameterAttribute;
|
8 | 10 | use App\Helpers\MetaFormats\Attributes\FPath;
|
@@ -50,8 +52,9 @@ public static function getEndpointAttributes(ReflectionMethod $reflectionMethod)
|
50 | 52 | $path = $reflectionMethod->getAttributes(name: Path::class);
|
51 | 53 | $query = $reflectionMethod->getAttributes(name: Query::class);
|
52 | 54 | $post = $reflectionMethod->getAttributes(name: Post::class);
|
| 55 | + $file = $reflectionMethod->getAttributes(name: File::class); |
53 | 56 | $param = $reflectionMethod->getAttributes(name: Param::class);
|
54 |
| - return array_merge($path, $query, $post, $param); |
| 57 | + return array_merge($path, $query, $post, $file, $param); |
55 | 58 | }
|
56 | 59 |
|
57 | 60 | /**
|
@@ -91,7 +94,14 @@ public static function extractFormatParameterData(ReflectionProperty $reflection
|
91 | 94 | $pathAttributes = $reflectionObject->getAttributes(FPath::class);
|
92 | 95 | $queryAttributes = $reflectionObject->getAttributes(FQuery::class);
|
93 | 96 | $postAttributes = $reflectionObject->getAttributes(FPost::class);
|
94 |
| - $requestAttributes = array_merge($longAttributes, $pathAttributes, $queryAttributes, $postAttributes); |
| 97 | + $fileAttributes = $reflectionObject->getAttributes(FFile::class); |
| 98 | + $requestAttributes = array_merge( |
| 99 | + $longAttributes, |
| 100 | + $pathAttributes, |
| 101 | + $queryAttributes, |
| 102 | + $postAttributes, |
| 103 | + $fileAttributes |
| 104 | + ); |
95 | 105 |
|
96 | 106 | // there should be only one attribute
|
97 | 107 | if (count($requestAttributes) == 0) {
|
|
0 commit comments