protected function displayVariable(ApiResource $variable)
    {
        /** @var \Platformsh\Cli\Service\Table $table */
        $table = $this->getService('table');
        /** @var \Platformsh\Cli\Service\PropertyFormatter $formatter */
        $formatter = $this->getService('property_formatter');

        $properties = $variable->getProperties();
        $properties['level'] = $this->getVariableLevel($variable);

        $headings = [];
        $values = [];
        foreach ($properties as $key => $value) {
            $headings[] = new AdaptiveTableCell($key, ['wrap' => false]);
            if ($key === 'value') {
                $value = wordwrap($value, 80, "\n", true);
            }
            $values[] = $formatter->format($value, $key);
        }
        $table->renderSimple($values, $headings);
    }
protected function displayVariable(ApiResource $variable)
    {
        /** @var \Platformsh\Cli\Service\Table $table */
        $table = $this->getService('table');
        /** @var \Platformsh\Cli\Service\PropertyFormatter $formatter */
        $formatter = $this->getService('property_formatter');

        $properties = $variable->getProperties();
        $properties['level'] = $this->getVariableLevel($variable);

        $headings = [];
        $values = [];
        foreach ($properties as $key => $value) {
            $headings[] = new AdaptiveTableCell($key, ['wrap' => false]);
            if ($key === 'value') {
                $value = wordwrap($value, 80, "\n", true);
            }
            $values[] = $formatter->format($value, $key);
        }
        $table->renderSimple($values, $headings);
    }
protected function displayVariable ( ApiResource $ variable ) { /** @var \Platformsh\Cli\Service\Table $table */ $ table = $ this -> getService ( 'table' ) ; /** @var \Platformsh\Cli\Service\PropertyFormatter $formatter */ $ formatter = $ this -> getService ( 'property_formatter' ) ; $ properties = $ variable -> getProperties ( ) ; $ properties [ 'level' ] = $ this -> getVariableLevel ( $ variable ) ; $ headings = [ ] ; $ values = [ ] ; foreach ( $ properties as $ key => $ value ) { $ headings [ ] = new AdaptiveTableCell ( $ key , [ 'wrap' => false ] ) ; if ( $ key === 'value' ) { $ value = wordwrap ( $ value , 80 , "\n" , true ) ; } $ values [ ] = $ formatter -> format ( $ value , $ key ) ; } $ table -> renderSimple ( $ values , $ headings ) ; }
Display a variable to stdout.

@param \Platformsh\Client\Model\Resource $variable
Display a variable to stdout .