public function dump($value, int $output = self::OUTPUT_ECHO): string
    {
        switch ($output) {
            case self::OUTPUT_ECHO:
                echo $this->style->wrapContainer($this->dumpValue($value, '', 0));
                break;

            case self::OUTPUT_LOG:
                if (!empty($this->logger)) {
                    $this->logger->debug($this->dump($value, self::OUTPUT_RETURN));
                }
                break;

            case self::OUTPUT_RETURN:
                return $this->style->wrapContainer($this->dumpValue($value, '', 0));
        }

        //Nothing to return
        return '';
    }
public function dump($value, int $output = self::OUTPUT_ECHO): string
    {
        switch ($output) {
            case self::OUTPUT_ECHO:
                echo $this->style->wrapContainer($this->dumpValue($value, '', 0));
                break;

            case self::OUTPUT_LOG:
                if (!empty($this->logger)) {
                    $this->logger->debug($this->dump($value, self::OUTPUT_RETURN));
                }
                break;

            case self::OUTPUT_RETURN:
                return $this->style->wrapContainer($this->dumpValue($value, '', 0));
        }

        //Nothing to return
        return '';
    }
public function dump ( $ value , int $ output = self :: OUTPUT_ECHO ) : string { switch ( $ output ) { case self :: OUTPUT_ECHO : echo $ this -> style -> wrapContainer ( $ this -> dumpValue ( $ value , '' , 0 ) ) ; break ; case self :: OUTPUT_LOG : if ( ! empty ( $ this -> logger ) ) { $ this -> logger -> debug ( $ this -> dump ( $ value , self :: OUTPUT_RETURN ) ) ; } break ; case self :: OUTPUT_RETURN : return $ this -> style -> wrapContainer ( $ this -> dumpValue ( $ value , '' , 0 ) ) ; } //Nothing to return return '' ; }
Dump specified value. Dumper will automatically detect CLI mode in OUTPUT_ECHO mode.

@param mixed $value
@param int   $output

@return string
Dump specified value . Dumper will automatically detect CLI mode in OUTPUT_ECHO mode .