darling/roady-ui-utilities 问题修复 & 功能扩展

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

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

darling/roady-ui-utilities

最新稳定版本:v1.0.0

Composer 安装命令:

composer create-project darling/roady-ui-utilities

包简介

UI utilities for the Roady php framework.

README 文档

README

Provides classes for the Roady php framework's User Interface.

Installation

composer require darling/roady-ui-utilities

Classes

\Darling\RoadyUIUtilities\classes\ui\html\UserInterface

A UserInterface can render output for a Response.

The UserInterface's defined under the Darling\RoadyUIUtilities\interfaces\ui\html namespace are intended to produce html for a web page based on the Routes defined by a given Response.

The following is a snippet from the Roady php framework's index.php file showing how a UserInterface is used in practice.

$currentRequest = new RequestInstance();
$roadyModuleFileSystemPathDeterminator =
    new RoadyModuleFileSystemPathDeterminatorInstance();

$router = new RouterInstance(
    new ListingOfDirectoryOfRoadyModulesInstance(
        RoadyAPI::pathToDirectoryOfRoadyModules()
    ),
    new ModuleCSSRouteDeterminatorInstance(),
    new ModuleJSRouteDeterminatorInstance(),
    new ModuleOutputRouteDeterminatorInstance(),
    $roadyModuleFileSystemPathDeterminator,
    new ModuleRoutesJsonConfigurationReaderInstance(),
);

$response = $router->handleRequest($currentRequest);

$roadyUI = new UserInterface(
    RoadyAPI::pathToDirectoryOfRoadyModules(),
    new RouteCollectionSorterInstance(),
    $roadyModuleFileSystemPathDeterminator,
);

echo $roadyUI->render($response);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-27