diff --git a/src/Annotation/Qualifier/UriTemplateBindings.php b/src/Annotation/Qualifier/UriTemplateBindings.php index 14ff507..41cdf74 100644 --- a/src/Annotation/Qualifier/UriTemplateBindings.php +++ b/src/Annotation/Qualifier/UriTemplateBindings.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the values expanded into the URI templates of every web API + */ #[Attribute(Attribute::TARGET_PARAMETER)] #[Qualifier] final class UriTemplateBindings diff --git a/src/Annotation/Qualifier/WebApiList.php b/src/Annotation/Qualifier/WebApiList.php index daf4189..6a5600c 100644 --- a/src/Annotation/Qualifier/WebApiList.php +++ b/src/Annotation/Qualifier/WebApiList.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the method and path of each web API, keyed by its id + */ #[Attribute(Attribute::TARGET_PARAMETER)] #[Qualifier] final class WebApiList diff --git a/src/Annotation/WebQuery.php b/src/Annotation/WebQuery.php index 739b855..c6e7b71 100644 --- a/src/Annotation/WebQuery.php +++ b/src/Annotation/WebQuery.php @@ -6,9 +6,23 @@ use Attribute; +/** + * Calls the web API registered under `id` with the method arguments and maps the response to the return type + * + * @see \Ray\MediaQuery\WebQueryInterceptor + */ #[Attribute(Attribute::TARGET_METHOD)] final class WebQuery { + /** + * @param string $id `id` of an entry in the `webQuery` list of the media query JSON + * @param string $type `row` maps the response to one object; `row_list` maps it to a list for an `array` + * or PostFetchInterface return type and to one object for another class or a union. + * Where one object is mapped, an empty response gives null. + * Read only with a factory or an entity. + * @param string $factory Class whose `factory()` builds each row; a static `factory()` is called directly, + * a non-static one on an instance from the injector + */ public function __construct( public string $id, public string $type = 'row_list',