* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; use Symfony\Component\VarDumper\VarDumper; /** * Configures dump() handler. * * @author Nicolas Grekas
*/ class DumpListener implements EventSubscriberInterface { private $cloner; private $dumper; public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper) { $this->cloner = $cloner; $this->dumper = $dumper; } public function configure() { $cloner = $this->cloner; $dumper = $this->dumper; VarDumper::setHandler(function ($var) use ($cloner, $dumper) { $dumper->dump($cloner->cloneVar($var)); }); } public static function getSubscribedEvents() { if (!class_exists(ConsoleEvents::class)) { return array(); } // Register early to have a working dump() as early as possible return array(ConsoleEvents::COMMAND => array('configure', 1024)); } } __halt_compiler();----SIGNATURE:----ENJ5Q5KTQUqjjeNoAFdhAkeyGY9P12esYZ9XC1E0UN2jQjvYFbNklEk22dBry77S3UNfiBkHyY9nu5EUDeG7k+QRq04Zh4xi5XQAwhAdkS7cXlGYnXkRMHSv8R7CYFqLmUIpYa06Ao4ofyDHni0wE+a/zNl7gfmtDD9mljdJBKtiEafr6MXiUVhDRiO2F/JznF0J/MZOGtBO3Yy2Y76r/q3I+4P6yXMb+wXoO7elk7dgES0aBR5Ef2yoKHJnSMkgpjkAd+xke5ZWmaFguMsMGEZ8qzTMnGQhU67NV9ZopYlyjcG6ufO/vVIZ6dI44uGca+ZN85Nsu00YAN80fUmm7CWhFiwuVsXS7i+ph/4boWkjJ8ytw4x+EWBxYveDb3z5BoDjJxF3rl6vAT5zrRXAIAgHWulcVdLh8grMw6S9G9f1zPgJDi7n9bRd7iKpH4S1eqNu6GT/9NdH/mhtqrN4r8pGt3vqDT9opsyY4jex458APGQGAondqpZnP0SuQh20CsneZgAqZwlnngERrj/PtaV2gGiUjkiKMmn4nrgulc6yWTAaxYSB+xsNafJ6VV7lwyI17Q4T795HToZCjFh66j68PZ9faIgqF0RIlI1f7cBTjpy7+e35KBRGqV23Nn1KFAirXc/bJIVCHilJhK8UEDAqvzy4aI/d7+V6ilkdJ0U=----ATTACHMENT:----ODc0MzIxMjI1MTkxMjU3NiA1NDEyODgyMjY4Mjg5MzMgODg5NTA5MTEzNTkwMjMzOA==