NaifyView\View\ViewFactory クラス

ViewFactory — ViewConfig から View / Engine を組み立てる factory

public façade と Engine 実装の間に立ち、config から必要な runtime 部品を組み立てる。 アプリ側は通常 NaifyView::create($config) 経由で利用する。

使用例

$factory = new ViewFactory();
$view = $factory->createFromViewConfig($config);

メソッド

メソッド説明
public createFromRawConfig(array|string $viewsDir, ?string $cacheDir, ?callable $errorHandler, array $filterHandlers = '...', array $callableProviders = '...', ?array $delimiters, string $compileLevel = debug, string $compilePipeline = direct, ?string $traceLevel, bool $autoEscape = false, array $templateIrProviders = '...'): View `createFromRawConfig()` を実行する
public createFromViewConfig(ViewConfig $config): View `createFromViewConfig()` を実行する
private snapshotFilterHandlers(array $filterHandlers): array `snapshotFilterHandlers()` を実行する
private snapshotFilterCallable(mixed $callable): mixed array 形式の filter handler に含まれる callable を snapshot する
private cloneFilterObject(object $object): object filter handler の状態を安全に clone する
private snapshotSurfaceObjects(array $objects, string $label): array `snapshotSurfaceObjects()` を実行する
private snapshotTemplateIrProviders(array $providers): array `snapshotTemplateIrProviders()` を実行する
private applyExtensionIngress(Engine $engine, array $callableProviders): void `applyExtensionIngress()` を実行する