PHP code example of hostnet / path-composer-plugin-lib

1. Go to this page and download the library: Download hostnet/path-composer-plugin-lib library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hostnet / path-composer-plugin-lib example snippets



namespace MyVendor\MyApp;

use Hostnet\Component\Path\Path;

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