germania-kg/pathprefixer 问题修复 & 功能扩展

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

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

germania-kg/pathprefixer

Composer 安装命令:

composer require germania-kg/pathprefixer

包简介

Recursively prepends a prefix to path string, array or StdClass objects.

README 文档

README

Recursively prepends a path prefix to path string, array or StdClass objects.

Packagist PHP version Build Status Scrutinizer Code Quality Code Coverage Build Status

Installation with Composer

$ composer require germania-kg/pathprefixer

Usage

<?php
use Germania\PathPrefixer\PathPrefixer;

// Root will default to getcwd()
$prefixer = new PathPrefixer( '/path/to/root' );

echo $prefixer('templates');
// Result: "/path/to/root/templates"


// Try on array:
$result = $prefixer([
	'foo' => 'includes',
	'bar' => 'templates'
]);
// Result: 
//	'foo' => '/path/to/root/includes',
//	'bar' => '/path/to/root/templates'

Custom path separators

Per default, the DIRECTORY_SEPARATOR constant will be used for glueing the prefix and the path. You may pass a custom seperator as well:

<?php
$prefixer = new PathPrefixer( '/path/to/root', "@" );

echo $prefixer('templates');
// Result: "/path/to/root@templates"

Issues

See issues list.

Development

$ git clone https://github.com/GermaniaKG/PathPrefixer.git
$ cd PathPrefixer
$ composer install

Unit tests

Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:

$ composer test
# or
$ vendor/bin/phpunit

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固