Download the PHP package transitive/web without Composer
On this page you can find all versions of the php package transitive/web. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download transitive/web
More information about transitive/web
Files in transitive/web
Package web
Short Description Web Front controller and view for transitive.
License MIT
Informations about the package web
Transitive\Web
HTTP front controller and HTML-oriented view layer for Transitive.
This package builds on transitive/core and transitive/routing to provide browser-facing rendering, content negotiation, default HTML layout handling, and helpers for scripts, styles, and metadata.
Installation
PHP 8.1+ is required.
What is included
Transitive\Web\Front: an HTTP front controller withAcceptheader negotiation and response header management.Transitive\Web\View: a richer (than Transitive\Simple) view implementation with title, meta tag, stylesheet, and script helpers.
Basic Usage
Response formats
Transitive\Web\Front can emit different representations depending on the resolved content type, including:
- HTML and XHTML
- JSON
- XML
- YAML
- raw stylesheet content
- raw script content
- serialised document/head/content payloads
By default it inspects $_SERVER['HTTP_ACCEPT'] and chooses the best supported MIME type.
View helpers
Transitive\Web\View extends the simple core view with helpers such as:
addMetaTag()/addRawMetaTag()addStyle()/linkStyleSheet()/importStyleSheet()addScript()/linkScript()/importScript()getHead(),getMetas(),getStyles(), andgetScripts()
Example:
License
MIT
All versions of web with dependencies
transitive/core Version ^2.5.4
transitive/routing Version ^2.4.4
transitive/simple Version ^2.5.4