php-cooper-config

ProjectRoot
in package

FinalYes

Where the application lives: the directory `config/config.casc` and `var/cache/cooper-config/` are found under by default.

The Composer root package's directory -- the project whose composer.json installed this library -- normalised to a real path. Not the working directory, which for a web request is usually public/ and for a worker whatever its supervisor chose. Only without Composer's runtime API (a hand-rolled autoloader) does it fall back to the working directory.

Table of Contents

Methods

detect()  : string
__construct()  : mixed

Methods

detect()

public static detect() : string
Return values
string —

the project root, as an absolute path

On this page

Search results