PHP code example of getsky / phalcon-bootstrap

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

    

getsky / phalcon-bootstrap example snippets


$app = new Bootstrap(new FactoryDefault());
echo $app->run();

$app = new Bootstrap(new FactoryDefault());
echo $app->run(true);

$app = new Bootstrap(new FactoryDefault());
$app->setPathConfig('config/config.%environment%.ini');
echo $app->run();

$app = new Bootstrap(new FactoryDefault(), 'prod');

$app = new Bootstrap(new FactoryDefault(), 'prod');
$app->setCacheable(false);

// check
echo $app->isCacheable();
// print: false

$app = new Bootstrap(new FactorDefault(), 'prod', 'FestApp');
// in another application:
$app = new Bootstrap(new FactorDefault(), 'prod', 'SecondApp');

$app = new Bootstrap(new FactoryDefault(), 'prod');

/**
* @var $loader Phalcon\Loader
*/
$loader = $app->getLoader();