PHP code example of egulias / tag-debug

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

    

egulias / tag-debug example snippets




use Egulias\TagDebug\Tag\TagFetcher;
use Egulias\TagDebug\Tag\FilterList;
use Symfony\Component\DependencyInjection\ContainerBuilder;

$containerBuilder = new ContainerBuilder;
$fetcher = new TagFetcher($containerBuilder);

$filters = new FilterList();
$tags = $fetcher->fetch($filters);

$tags['tag-name']['Class\Name\Of\Service']['tag'] = Egulias\TagDebug\Tag\Tag
$tags['tag-name']['Class\Name\Of\Service']['definition'] = Symfony\Component\DependencyInjection\Definition
 



use Egulias\TagDebug\Tag\TagFetcher;
use Egulias\TagDebug\Tag\FilterList;
use Egulias\TagDebug\Tag\Filter\Name;
use Symfony\Component\DependencyInjection\ContainerBuilder;

$containerBuilder = new ContainerBuilder;
$fetcher = new TagFetcher($containerBuilder);

$filters = new FilterList();
$filters->addFilter(new Name("nameToFilterFor"));
$tags = $fetcher->fetch($filters);