PHPackages                             vssl/render - 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. [Templating &amp; Views](/categories/templating)
4. /
5. vssl/render

ActiveLibrary[Templating &amp; Views](/categories/templating)

vssl/render
===========

Rendering agent for Journey Group’s Vessel Pages.

6.8.13(5mo ago)1471MITPHPPHP ^8.3CI passing

Since Mar 17Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/vssl/render)[ Packagist](https://packagist.org/packages/vssl/render)[ RSS](/packages/vssl-render/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (9)Dependencies (9)Versions (70)Used By (0)

Vessel Render
-------------

[](#vessel-render)

[![Build Status](https://camo.githubusercontent.com/d83fb91bb44f4bb175af4c829e6d8c4e0fdd86e7f6d6e8610e6222c49ffecb1c/68747470733a2f2f7472617669732d63692e6f72672f6a6f75726e657967726f75702f7673736c2d72656e6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/journeygroup/vssl-render)[![Code Coverage](https://camo.githubusercontent.com/c67d71d13c67f502a61095b8f3c3e68c19b24f54068458d470f7be80d4f3b5ca/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f75726e657967726f75702f7673736c2d72656e6465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/journeygroup/vssl-render/?branch=master)

What
----

[](#what)

This package contains a PHP rendering agent for Vessel Pages. It includes a PSR-15 middleware implementation to easily attach to any conforming framework and will automatically consume the Vessel Pages API and render production-ready markup.

Configuration
-------------

[](#configuration)

```
use Vssl\Resolver;
use Journey\Cache\LocalAdapter;

$config = [
    'cache' => new LocalAdapter('/tmp')
];

Resolver::config($config);

// for manual instantiation, you can also pass in a configuration.

$resolver = new Resolver($request, $config);
```

### Configuration options

[](#configuration-options)

The only required configuration option is an implementation of `Journey\Cache\CacheAdapterInterface`.

OptionDescription`cache`Instance of `Journey\Cache\CacheAdapterInterface` (or `null` to disable)`cache_ttl`Integer, number of seconds to store in cache`base_uri`URI for Vessel API interaction`base_path`Path to add to `base_uri` for versioned Vessel API interaction`required_fields`Keys required for API data to be considered valid`templates`Additional directory to find custom render templatesHow
---

[](#how)

Attach the [middleware](/src/Middleware.php) to your favorite PSR-15 dispatcher before your router. When the request arrives in your controller methods, it will have an attribute `vssl-page` with content ready to be rendered.

```
