PHP code example of brunonatali / install

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

    

brunonatali / install example snippets


use BrunoNatali\Install\Factory;

$myApp = new Factory( ["dir" => __DIR__] );

$myApp->install();

\BrunoNatali\Install\Factory::installAll()

/**
 * Installation will be made in basic mode, no services or post scripts 
 *  are done in this mode
*/
\BrunoNatali\Install\Factory::installAll( null, array(
    'appToNotInstall' => true  // Don`t metter the value
) );

/**
 * Installation will be entirely skipped
*/
\BrunoNatali\Install\Factory::installAll( null, array(
    'appToNotInstall' => 'force'  // Set value to 'force'
) );

#!/usr/bin/php



e\Service;

$myService = new Service();

$myService->start();

/**
 * engine.php
*/
use BrunoNatali\Install\Factory;
$myApp = new Factory( ["dir" => __DIR__] );
$myApp->install();

/**
 * wheelsNtires.php
*/
use BrunoNatali\Install\Factory;
$myApp = new Factory( ["dir" => __DIR__] );
$myApp->install();

/**
 * car.php
*/
use BrunoNatali\Install\Factory;
$myApp = new Factory( ["dir" => __DIR__] );
$myApp->install( array(
    '
shell
+-- installation
|   +-- install.php
|   +-- install-instructions.json
+-- pbin
|   +-- my_program_executable
+-- src
|   +-- YourClass.php
+-- post-install
|   +-- myScript.sh
+-- composer.json
shell
$ php vendor/myname/appname/installation/install.php
shell
$ sudo php -r "