Helper for vendor directory location in Composer
PHP
Permalink
Failed to load latest commit information.
class-locate-vendor.php
composer.json
readme.md

readme.md

Locate Vendor — directory in Composer

Locate Vendor determines file system location of packages in Composer environment.

Installation

Require in your composer.json

{
    "require" : {
        "rarst/locate-vendor" : "~1.0"
    }
}

or

composer require rarst/locate-vendor:~1.0 --update-no-dev

Methods

get_vendor_path()

Example code:

$vendor_path  = \Rarst\Composer\Locate_Vendor::get_vendor_path();

get_package_path()

Example code:

$package_path = \Rarst\Composer\Locate_Vendor::get_package_path( 'twbs/bootstrap' );