定制 skyline/direct-components-forwarding 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

skyline/direct-components-forwarding

Composer 安装命令:

composer require skyline/direct-components-forwarding

包简介

README 文档

README

This package allows you to register directories as direct accessable component sources.

Installation

$ composer require skyline/direct-components-forwarding

Usage

With this package, another Component class is available.

Just use it in your component.config.php file:

<?php
use Skyline\Component\Config\OpenDirectoryComponent;

return [
    // Can be any name. Including it into template has no effect.
    'Open' => new OpenDirectoryComponent(
        '/Library',     // URI prefix  => <img src="/Public/Library/my-image.jpg">
        __DIR__ . "/path/to/library"
    )
];

This example will look for a file at: __DIR__ . "/path/to/library/my-image.jpg
If it finds one, its gonna be delivered, otherwise a 404 error is given (except other plugins are able to resolve the request into a existing component.)

Please note that the URIs and paths are recursive:

<img src="/Public/Library/media/users/me.jpg" />

will be resolved to

<?php
__DIR__ . "/path/to/library/media/users/me.jpg";

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固