PHP code example of renegare / skip

1. Go to this page and download the library: Download renegare/skip 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/ */

    

renegare / skip example snippets



 = new Silex\Application();

// definitions (that gets overly bloated as your app grows)

$app->run();



figPaths = array(__DIR__ . '/config', __DIR__ . '/dev/config', __DIR__ . '/live/config');

// used to replace 'placeholders' in you configuration (e.g "param1": "#RANDOM_ENV_VAR_1#/goes/here")
$placeholders = array('RANDOM_ENV_VAR_1' => 'something', 'RANDOM_ENV_VAR_2' => '2');
$loader = new Skip\ConfigLoader($configPaths, null, $placeholders);

$app = new Skip\WebApplication();
$app->setConfigLoader($loader);
$app->configure();
$app->run();

#!/usr/bin/env php

Application();
$app->setConfigLoaderCallback(function(Symfony\Component\Console\Input\InputInterface $input, $env, $devUser) {
    $configPaths = array(__DIR__ . '/config', __DIR__ . '/dev/config', __DIR__ . '/live/config');

    $placeholders = array('RANDOM_ENV_VAR_1' => 'something', 'RANDOM_ENV_VAR_2' => '2');
    $loader = new Skip\ConfigLoader($configPaths, null, $placeholders);

    return $loader;
});
$app->run();