hostnet/path-composer-plugin-lib 问题修复 & 功能扩展

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

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

hostnet/path-composer-plugin-lib

最新稳定版本:1.0.6

Composer 安装命令:

composer require hostnet/path-composer-plugin-lib

包简介

Publish vendor_dir and base_dir as constants

README 文档

README

When do I need this?

If you are developing a composer package, and you want to know the location of the project root and/or the vendor directory.

Can I do without?

Sometimes you will work on your package stand alone, for instance on the unit tests. In that case your vendor directory can be determined relatively to a file.

You of course want your package to function when included via composer. Usually you can determine the vendor directory by going up a couple of directories. But don't forget to take the [vendor-dir] (https://getcomposer.org/doc/06-config.md#vendor-dir) config option into account.

This package takes care of that. Even better: it calculates the directory during composer install. So it's faster.

How do I use it?

<?php
namespace MyVendor\MyApp;

use Hostnet\Component\Path\Path;

class ClassInNeed
{
    public function doSomethingWithPaths()
    {
        $vendor_dir = Path::VENDOR_DIR
        $base_dir   = Path::BASE_DIR
        // ...
    }
}

Installation

Install using composer by using the command line interface or adding the package name hostnet/path-composer-plugin-lib to composer.json

{
    "require": {
        "hostnet/path-composer-plugin-lib": "^1.0.0"
    }
}

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 4
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固