ToolView
in package
FinalYes
ツールの処理結果を Responder に渡す不変ペイロード(ADR の Domain Payload 相当)。
旧 Surfacer は $this->Post / $this->Error を書き換えて画面状態を伝えていたが、本オブジェクトを
返すことで「どの画面を・どんなエラー/通知・どんな View データで描くか」を明示的な戻り値にする。
生成は名前付きコンストラクタ(form / invalid / done)に集約し、多段ツールは
on で任意の screen トークンを指定する。
Table of Contents
Properties
- $data : array<string|int, mixed>
- $errors : ToolErrors
- $notices : array<string|int, mixed>
- $screen : string
Methods
- done() : self
- 実行完了。
- form() : self
- 入力フォーム(初期表示)。
- invalid() : self
- バリデーション/実行エラーでフォーム再表示。
- on() : self
- 多段ツール(SystemUpdate の 'drop' / 'complete' 等)向けに任意の screen トークンで組む。
- __construct() : mixed
Properties
$data read-only
public
array<string|int, mixed>
$data
$errors read-only
public
ToolErrors
$errors
$notices read-only
public
array<string|int, mixed>
$notices
$screen read-only
public
string
$screen
Methods
done()
実行完了。
public
static done([array<string, mixed> $data = [] ][, array<string, mixed> $notices = [] ]) : self
Parameters
- $data : array<string, mixed> = []
- $notices : array<string, mixed> = []
Return values
selfform()
入力フォーム(初期表示)。
public
static form([array<string, mixed> $data = [] ]) : self
Parameters
- $data : array<string, mixed> = []
Return values
selfinvalid()
バリデーション/実行エラーでフォーム再表示。
public
static invalid(ToolErrors $errors[, array<string, mixed> $data = [] ]) : self
Parameters
- $errors : ToolErrors
- $data : array<string, mixed> = []
Return values
selfon()
多段ツール(SystemUpdate の 'drop' / 'complete' 等)向けに任意の screen トークンで組む。
public
static on(string $screen[, array<string, mixed> $data = [] ][, ToolErrors|null $errors = null ][, array<string, mixed> $notices = [] ]) : self
Parameters
- $screen : string
- $data : array<string, mixed> = []
- $errors : ToolErrors|null = null
- $notices : array<string, mixed> = []
Return values
self__construct()
private
__construct(string $screen, ToolErrors $errors, array<string, mixed> $notices, array<string, mixed> $data) : mixed
Parameters
- $screen : string
- $errors : ToolErrors
- $notices : array<string, mixed>
- $data : array<string, mixed>
-
画面固有の View データ(一覧・再表示入力値など)