PHPackages                             transitive/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. transitive/core

ActiveLibrary[Framework](/categories/framework)

transitive/core
===============

Core classes of Transitive MVP framework

2.5.4(1mo ago)11.5k2MITPHPPHP &gt;8.1CI failing

Since Jan 2Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/RobinDumontChaponet/TransitiveCore)[ Packagist](https://packagist.org/packages/transitive/core)[ RSS](/packages/transitive-core/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (8)Versions (23)Used By (2)

Transitive\\Core
================

[](#transitivecore)

$$ {\\displaystyle \\forall a,b,c\\in X:(aRb\\wedge bRc)\\Rightarrow aRc} $$

---

Core primitives for the Transitive MVP stack.

This package provides the base presenter and view contracts used by the other Transitive packages, plus a lightweight `Transitive\Simple` implementation that can run on its own when you do not need the web-specific layer.

[![Latest Stable Version](https://camo.githubusercontent.com/5e763d043b03ca1fc7defa1fa6fa08481fbf347170a0ad1a663d88784cadd5b3/68747470733a2f2f706f7365722e707567782e6f72672f7472616e7369746976652f636f72652f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/transitive/core)[![License](https://camo.githubusercontent.com/edd2e88526590550f4b994427945aa005bd647dc930a61979c06b00d03f2ab9a/68747470733a2f2f706f7365722e707567782e6f72672f7472616e7369746976652f636f72652f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/transitive/core)

What is included
----------------

[](#what-is-included)

- `Transitive\Core\Presenter`: stores presenter data and supports flow breaks with `redirect()`.
- `Transitive\Core\View`: the interface every Transitive view must implement.
- `Transitive\Core\ViewResource`: wraps a value and exposes helpers like `asArray()`, `asJSON()`, `asXML()`, `asYAML()`, `asString()`, and `asSerialized()`.
- `Transitive\Core\BreakFlowException`: used internally to interrupt route execution and redirect to another request.
- `Transitive\Simple\View`: a default in-memory view implementation for titles, typed content, and document serialization.
- `Transitive\Simple\Front`: a minimal front controller that executes routes and can export rendered output.

Installation
------------

[](#installation)

```
composer require transitive/core
```

PHP `8.1+` is required.

Basic usage
-----------

[](#basic-usage)

```
