diff --git a/src/Annotation/Ssr.php b/src/Annotation/Ssr.php index 00265f6..89a4005 100644 --- a/src/Annotation/Ssr.php +++ b/src/Annotation/Ssr.php @@ -7,14 +7,21 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Renders the response of the method on the server with the JavaScript application `app` + * + * @see \BEAR\SsrModule\SsrInterceptor + */ #[Attribute(Attribute::TARGET_METHOD)] #[Qualifier] final class Ssr { /** - * @param string|null $app App name - * @param array $state State keys in body - * @param array $metas Meta keys in body + * @param string|null $app Name of the JS application bundle; null throws NoAppValueException + * @param array $state Body keys passed as the first argument of the JS `render(state, metas)`; `['*']` passes + * the whole body, and a key not in the body throws StatusKeyNotExistsException + * @param array $metas Body keys passed as the second argument of the JS `render(state, metas)`; `['*']` passes + * the whole body, and a key not in the body throws MetaKeyNotExistsException */ public function __construct( public readonly ?string $app = null, diff --git a/src/Annotation/SsrCacheConfig.php b/src/Annotation/SsrCacheConfig.php index e6f20f9..ba30005 100644 --- a/src/Annotation/SsrCacheConfig.php +++ b/src/Annotation/SsrCacheConfig.php @@ -7,6 +7,7 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** Qualifies the PSR-16 cache that keeps the V8Js snapshot of each SSR application */ #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_PARAMETER)] #[Qualifier] final class SsrCacheConfig