PHP code example of modera / routing-bundle

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

    

modera / routing-bundle example snippets

 php

// config/bundles.php

return [
    // ...
    Sli\ExpanderBundle\SliExpanderBundle::class => ['all' => true], // if you still don't have it
    Modera\RoutingBundle\ModeraRoutingBundle::class => ['all' => true],
];
 php


namespace Modera\ExampleBundle\Contributions;

use Sli\ExpanderBundle\Ext\ContributorInterface;

class RoutingResourcesProvider implements ContributorInterface
{
    public function getItems()
    {
        return array(
            '@ModeraExampleBundle/Resources/config/routing.yml'
        );
    }
}
 php


class RoutingResourcesProvider implements ContributorInterface
{
    public function getItems()
    {
        return array(
            array(
                'resource' => '@ModeraExampleBundle/Controller/DefaultController.php',
                'type' => 'annotation',
            ),
        );
    }
}