CoreFiles by mySites.guru
ObjectOutputCommand.php20 lines, 551 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
4fdbf906401ee70d16aaa1524be11cfe
sha1
237595d9e4e61c80188a2114c4522eff480e4c46
sha256
28b931b0e64ecb3097db2930f42a4b902d18b87476d931f09b6619ff8e473be0
<?php

declare(strict_types=1);

namespace Jose\Component\Console;

use Jose\Component\Core\Util\JsonConverter;
use JsonSerializable;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

abstract class ObjectOutputCommand extends Command
{
    protected function prepareJsonOutput(InputInterface $input, OutputInterface $output, JsonSerializable $json): void
    {
        $data = JsonConverter::encode($json);
        $output->write($data);
    }
}

The same content is in 135 releases, Joomla 5.1.0-beta1 to 6.2.1. See them all, or every version of this file.