PHP code example of raindrop / routing-bundle

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

    

raindrop / routing-bundle example snippets

 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Raindrop\RoutingBundle\RaindropRoutingBundle(),
    );
}
 php
class myController {

    public function indexAction($content) 
    {
        // your code here
    }
}
 php
$route->setRouteContent('Acme\DemoBundle\Entity\SampleEntity::1');
 php
$route->setRouteContent('Acme\DemoBundle\Entity\SampleEntity:entity_id:1');
 php
$route->setContent($object); // sets routeContent to 'Path\To\Entity:id:1'

$route->setContent($object, 'entity_id'); // sets routeContent 'Path\To\Entity:entity_id:1'
 php
$route->setRouteContent('Acme\DemoBundle\Entity\Route:locale(s):en');
 php
$route->setContent($array, $field, $value);
$value
$route->setContent($array, $field);
 php
$route->setContent($anotherRoute); // instead of $route->setRouteContent('…');