vssl/render 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vssl/render

Composer 安装命令:

composer require vssl/render

包简介

Rendering agent for Journey Group’s Vessel Pages.

README 文档

README

Build Status Code Coverage

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

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

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

Option Description
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 templates

How

Attach the middleware 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.

<?php

namespace App\Controllers;

class YourController {
    /**
     * Any controller method.
     */
    public function anypage(ServerRequestInterface $request)
    {
        $page = $request->getAttribute('vssl-page');
    }
}

统计信息

  • 总下载量: 477
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固