PHP code example of saxulum / saxulum-bundle-provider

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

    

saxulum / saxulum-bundle-provider example snippets

{.php}
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
 {.php}
$app->register(new DoctrineOrmServiceProvider(), array(
    'orm.proxies_dir' => __DIR__ . '/../../../../../doctrine/proxies'
));
 {.php}


namespace Saxulum\Tests\BundleProvider\Sample;

use Saxulum\BundleProvider\Provider\AbstractBundleProvider;
use Silex\Application;

class BundleProvider extends AbstractBundleProvider
{
    public function register(Application $app)
    {
        $this->addCommands($app);
        $this->addControllers($app);
        $this->addDoctrineOrmMappings($app);
        $this->addTranslatorRessources($app);
        $this->addTwigLoaderFilesystemPath($app);
    }

    public function boot(Application $app) {}
}
 {.php}
$app->register(new BundleProvider());
 {.php}
$app['twig']->render('@SaxulumTestsBundleProviderSample/test.html.twig')