Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Annotation/Qualifier/UriTemplateBindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/Annotation/Qualifier/WebApiList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions src/Annotation/WebQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
* 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',
Expand Down
Loading