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
13 changes: 10 additions & 3 deletions src/Annotation/Ssr.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
*/
#[Attribute(Attribute::TARGET_METHOD)]
#[Qualifier]
final class Ssr
{
/**
* @param string|null $app App name
* @param array<string> $state State keys in body
* @param array<string> $metas Meta keys in body
* @param string|null $app Name of the JS application bundle; null throws NoAppValueException
* @param array<string> $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<string> $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,
Expand Down
1 change: 1 addition & 0 deletions src/Annotation/SsrCacheConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading