1. Go to this page and download the library: Download lechimp-p/flightcontrol 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/ */
lechimp-p / flightcontrol example snippets
League\Flysystem\Adapter\Local;
use \League\Flysystem\Filesystem;
use \Lechimp\Flightcontrol\Flightcontrol;
$adapter = new Local(__DIR__, LOCK_EX, Local::SKIP_LINKS);
$flysystem = new Filesystem($adapter);
$flightcontrol = new Flightcontrol($flysystem);
// base directory from the flysystem:
$root = $flightcontrol->get("/");
assert($root !== null);
assert($root instanceof \Lechimp\Flightcontrol\FSObject);
// the tests directory:
$tests = $flightcontrol->directory("/tests");
assert($tests !== null);
assert($tests instanceof \Lechimp\Flightcontrol\Directory);
// this file:
$readme = $flightcontrol->file("/README.md");
assert($readme !== null);
assert($readme instanceof \Lechimp\Flightcontrol\File);