PHP code example of niirrty / niirrty.io.vfs
1. Go to this page and download the library: Download niirrty/niirrty.io.vfs 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/ */
niirrty / niirrty.io.vfs example snippets
\Niirrty\IO\Vfs\VfsManager;
use \Niirrty\IO\Vfs\VfsHandler;
$vfsManager = VfsManager::Create()
->addHandler(
VfsHandler::Create( 'Test 1', 'foo', ':/', __DIR__ )
->addReplacement( 'myReplacement', 'Blub' )
);
echo $vfsManager->parsePath( 'foo:/bar/bazz.txt' ), "\n";
echo $vfsManager->parsePath( 'foo:/${myDynamicPart}/bazz.txt', [ 'myDynamicReplacement' => 'abc/def' ] ), "\n";
echo $vfsManager->parsePath( 'foo:/Bar/Bazz/${myReplacement}.xml' );