PHP code example of tekton / framework
1. Go to this page and download the library: Download tekton/framework 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/ */
tekton / framework example snippets
use Tekton\Framework;
use DI\Container;
$framework = Framework::getInstance();
$framework->setContainer(new Container)
->setEnvironment('development')
->setResourceCaching(true)
->setCacheDir(__DIR__.'/cache')
->registerConfig(__DIR__.'/config');
->setFacadeAliases('Project\\Facades', __DIR__.'/Facades')
->registerAlias('ProjectClass', 'Project\\Class');
$framework->registerProvider([
\Project\Providers\ServiceOne::class,
\Project\Providers\ServiceTwo::class,
\Project\Providers\ServiceThree::class,
]);
$framework->init(__DIR__, 'http://localhost:8000/');
$framework = Framework::getInstance();
$framework->setContainer(new Container)
->registerConfig(__DIR__.'/config')
->loadEnv()
->loadConfig();
$framework->registerProvider(app('config')->get('app.providers'));
$framework->registerAlias(app('config')->get('app.aliases'));
$framework->init(__DIR__, 'http://localhost:8000/');