src/Dumper.php
private function getRenderer(int $target): RendererInterface
    {
        if ($target == self::OUTPUT && System::isCLI()) {
            if (System::isColorsSupported(STDOUT)) {
                $target = self::OUTPUT_CLI_COLORS;
            } else {
                $target = self::OUTPUT_CLI;
            }
        }

        if (!isset($this->targets[$target])) {
            throw new DumperException(sprintf("Undefined dump target %d", $target));
        }

        if (is_string($this->targets[$target])) {
            $this->targets[$target] = new $this->targets[$target]();
        }

        return $this->targets[$target];
    }
private function getRenderer(int $target): RendererInterface
    {
        if ($target == self::OUTPUT && System::isCLI()) {
            if (System::isColorsSupported(STDOUT)) {
                $target = self::OUTPUT_CLI_COLORS;
            } else {
                $target = self::OUTPUT_CLI;
            }
        }

        if (!isset($this->targets[$target])) {
            throw new DumperException(sprintf("Undefined dump target %d", $target));
        }

        if (is_string($this->targets[$target])) {
            $this->targets[$target] = new $this->targets[$target]();
        }

        return $this->targets[$target];
    }
private function getRenderer ( int $ target ) : RendererInterface { if ( $ target == self :: OUTPUT && System :: isCLI ( ) ) { if ( System :: isColorsSupported ( STDOUT ) ) { $ target = self :: OUTPUT_CLI_COLORS ; } else { $ target = self :: OUTPUT_CLI ; } } if ( ! isset ( $ this -> targets [ $ target ] ) ) { throw new DumperException ( sprintf ( "Undefined dump target %d" , $ target ) ) ; } if ( is_string ( $ this -> targets [ $ target ] ) ) { $ this -> targets [ $ target ] = new $ this -> targets [ $ target ] ( ) ; } return $ this -> targets [ $ target ] ; }
Returns renderer instance associated with given output target. Automatically detects CLI mode, RR mode and
colorization support.

@param int $target
@return RendererInterface
@throws DumperException
Returns renderer instance associated with given output target . Automatically detects CLI mode RR mode and colorization support .