1. Go to this page and download the library: Download tuum/builder 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/ */
tuum / builder example snippets
use WScore\Builder\Builder;
$builder = Builder::forge(
__DIR__ . '/config, // app directory
__DIR__ . '/var', // var directory
true // debug
);
$builder->loadEnv();
$builder->load('setup');
$builder->load('routes');
if ($builder->isEnv('local')) {
$builder->load('extra.local');
}
$app = $builder->getApp(); // <- must set an app using setApp()!
use WScore\Builder\Builder;
$builder = new Builder([
Builder::APP_DIR => __DIR__ . '/config, // app directory
Builder::VAR_DIR => __DIR__ . '/var', // var directory
Builder::DEBUG => true // debug
]);
$builder->load('setup');
/** @var Tuum\Builder\Builder $builder */
$builder->set(Builder::APP_KEY, 'ENV'); // set value
$builder->setApp(new YourApp()); // set your application
return [
'db-name' => $builder->get('DB_NAME', 'demo'),
]; // may return some value