PHP code example of micro-module / decorator-bundle

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

    

micro-module / decorator-bundle example snippets


$iterator = new InfiniteIterator(
    new ArrayIterator(['element1', 'element2'])
);

$iterator = new InfiniteIterator(
    new ArrayIterator(['element1', 'element2'])
);

namespace …;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use InterNations\Bundle\DecoratorBundle\Tagger\DecorationTagger;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class MyCompilerPass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        DecorationTagger::tag($container, 'common_service', 'special_decorator', 255);
    }
}