Skip to content

Instantly share code, notes, and snippets.

View NicolasBadey's full-sized avatar

Nicolas Badey NicolasBadey

View GitHub Profile
@NicolasBadey
NicolasBadey / CalculatorHandler.php
Last active September 16, 2022 15:06 — forked from takali/CalculatorHandler.php
Symfony : Inject all class implementing a specific interface
<?php
namespace App\Handler;
use App\Calculator\CalculatorInterface;
class CalculatorHandler
{
/**
* @var CalculatorInterface[]
<?php
namespace Cappl;
use Symfony\Component\Console\Application as BaseApplication;
use Cappl\Console\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Pimple\ServiceProviderInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;