PHP code example of aharabara / habarnam

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

    

aharabara / habarnam example snippets




use Base\{Application, Core\Installer, Core\Workspace, Services\ViewRender};

config
$workspace = new Workspace("habarnam-{$projectName}");
$installer = new Installer($workspace);

$installer->checkCompatibility();

if (!$installer->isInstalled()) {
    $installer->run();
}

/* folder with surfaces.xml and other view files */
$render = new ViewRender(__DIR__. '/views/');

(new Application($workspace, $render->prepare(), 'main'))
    ->debug(true)
    ->handle();