WP_CLI\Formatter::display_item PHP Метод

display_item() публичный Метод

Display a single item according to the output arguments.
public display_item ( mixed $item )
$item mixed
    public function display_item($item)
    {
        if (isset($this->args['field'])) {
            $item = (object) $item;
            $key = $this->find_item_key($item, $this->args['field']);
            $value = $item->{$key};
            if (in_array($this->args['format'], array('table', 'csv')) && (is_object($value) || is_array($value))) {
                $value = json_encode($value);
            }
            \WP_CLI::print_value($value, array('format' => $this->args['format']));
        } else {
            $this->show_multiple_fields($item, $this->args['format']);
        }
    }