CommonPHP UI owns lightweight rendering abstractions. It should stay small, predictable, and independent from application transport concerns.
- view objects;
- view data bags;
- template, layout, and component metadata;
- component registration and lookup;
- renderer contracts;
- a native PHP renderer;
- package-specific UI exceptions;
- a
ViewFactoryentry point.
- routing;
- HTTP request or response handling;
- form validation;
- session flashing;
- authorization;
- asset compilation;
- front-end build tooling;
- a global application container;
- a full template language.
comphp/httpowns HTTP request and response objects.comphp/routerowns route matching and dispatch.comphp/validationowns validation results and rules.comphp/runtimeowns bootstrapping, lifecycle, and generic driver support.- UI drivers such as Twig should live outside this package and implement
RendererInterface.
UI should describe what to render and which renderer can render it. It should not decide which route was matched, how responses are emitted, or how assets are built.