Skip to content

ghostwriter/root

Root

Automation PHP Version Packagist Downloads PayPal Sponsors via GitHub

Project root directory implementation in PHP

Installation

You can install the package via composer:

composer require ghostwriter/root

Star ⭐️ this repo if you find it useful

You can also star (🌟) this repo to find it easier later.

Usage

use Ghostwriter\Root\AbstractRootDirectory;

$appRootDirectory = new readonly class('/tmp/app') extends AbstractRootDirectory {}

// returns the absolute path to the root directory
$appRootDirectory->toString(); // /tmp/app

// returns the absolute path to the src directory
$appRootDirectory->path('src'); // /tmp/app/src

// returns the absolute path to the src/Foo/Bar.php file
$appRootDirectory->path('src', 'Foo', 'Bar.php'); // /tmp/app/src/Foo/Bar.php

Credits

Changelog

Please see CHANGELOG.md for more information on what has changed recently.

License

Please see LICENSE for more information on the license that applies to this project.

Security

Please see SECURITY.md for more information on security disclosure process.

About

Project root directory implementation in PHP

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Generated from ghostwriter/wip