定制 ketwaroo/package-info 二次开发

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

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

ketwaroo/package-info

Composer 安装命令:

composer require ketwaroo/package-info

包简介

Sort of a reflection tool for composer packages.

README 文档

README

This is sort of a reflection tool for the composer package we're working in.

Most common usage would be if you need to determine the base path of your package. Or if you have a project that spans multiple sub packages.

Usage. Of sorts.

namespace Vendor/Package;

use Ketwaroo/PackageInfo

class SomeClass{

    public function readStaticCsvData(){

        // say you need to read some data located in /vendor/package/data/mydata.csv;
        // instead of mucking about with relative paths,

        $root = PackageInfo::whereAmI($this);

        $csv = file($root.'/data/mydata.csv');

        // ..etc

    }
}

TODO.

unit tests. maybe. figure out what else this could be useful for.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-05