PHP code example of gerkirill / silex-rad

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

    

gerkirill / silex-rad example snippets


$app->register(new \SilexRad\AutoService\Provider\AutoServiceProvider(), array(
    'rad.service.directories' => array(
        __DIR__ . '/../src/Service' => array('namespace' => 'Service')
    )
));

// this built-in service provider is rviceControllerServiceProvider());
// here you can use AutoServiceProvider to automatically register controllers as services, or you'll have to do it manually
$app->register(new \SilexRad\AutoRoute\Provider\AutoRouteProvider());

$app->register(new \SilexRad\AutoTemplate\Provider\AutoTemplateProvider());

class MyTestController {
    private $app;
    ...
    public function myExample() {
        return $this->app['rad.template.render'](['hello' => 'world']);
    }    
}