PHP code example of flux-eco / source-downloader

1. Go to this page and download the library: Download flux-eco/source-downloader 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/ */

    

flux-eco / source-downloader example snippets




luxEco\SourceDownloader;
use FluxEco\DotEnv;

DotEnv\Api::new()->load(__DIR__);

$sourceListFile = getenv(SourceDownloader\Env::SOURCE_LIST_FILE_PATH);
$volumePath = getenv(SourceDownloader\Env::VOLUME_PATH);
$gitGetFullClone = getenv(SourceDownloader\Env::GIT_FULL_CLONE);

$api = SourceDownloader\Api::new($gitGetFullClone);
$api->downloadSources($sourceListFile, $volumePath);



\loadDotEnv(__DIR__);

fluxy\downloadSources(
    fluxy\getEnvSourceDownloaderSourceListFilePath(),
    fluxy\getEnvSourceDownloaderVolumePath(),
    fluxy\getEnvSourceDownloaderGitFullClone()
);