public function displayData(OutputInterface $output, array $data, $property = null)
    {
        $key = null;

        if ($property) {
            $parents = explode('.', $property);
            $key = end($parents);
            $data = NestedArrayUtil::getNestedArrayValue($data, $parents, $keyExists);
            if (!$keyExists) {
                throw new \InvalidArgumentException('Property not found: ' . $property);
            }
        }

        if (!is_string($data)) {
            $output->write(Yaml::dump($data, 5, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
        } else {
            $output->writeln($this->format($data, $key));
        }
    }
public function displayData(OutputInterface $output, array $data, $property = null)
    {
        $key = null;

        if ($property) {
            $parents = explode('.', $property);
            $key = end($parents);
            $data = NestedArrayUtil::getNestedArrayValue($data, $parents, $keyExists);
            if (!$keyExists) {
                throw new \InvalidArgumentException('Property not found: ' . $property);
            }
        }

        if (!is_string($data)) {
            $output->write(Yaml::dump($data, 5, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
        } else {
            $output->writeln($this->format($data, $key));
        }
    }
public function displayData ( OutputInterface $ output , array $ data , $ property = null ) { $ key = null ; if ( $ property ) { $ parents = explode ( '.' , $ property ) ; $ key = end ( $ parents ) ; $ data = NestedArrayUtil :: getNestedArrayValue ( $ data , $ parents , $ keyExists ) ; if ( ! $ keyExists ) { throw new \ InvalidArgumentException ( 'Property not found: ' . $ property ) ; } } if ( ! is_string ( $ data ) ) { $ output -> write ( Yaml :: dump ( $ data , 5 , 4 , Yaml :: DUMP_MULTI_LINE_LITERAL_BLOCK ) ) ; } else { $ output -> writeln ( $ this -> format ( $ data , $ key ) ) ; } }
Display a complex data structure.

@param OutputInterface $output     An output object.
@param array           $data       The data to display.
@param string|null     $property   The property of the data to display
(a dot-separated string).
Display a complex data structure .