php/WP_CLI/Formatter.php
public function display_item( $item, $ascii_pre_colorized = false ) {
		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' ), true ) && ( 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'], $ascii_pre_colorized );
		}
	}
public function display_item( $item, $ascii_pre_colorized = false ) {
		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' ), true ) && ( 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'], $ascii_pre_colorized );
		}
	}
public function display_item ( $ item , $ ascii_pre_colorized = false ) { 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' ) , true ) && ( 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' ] , $ ascii_pre_colorized ) ; } }
Display a single item according to the output arguments.

@param mixed      $item
@param bool|array $ascii_pre_colorized Optional. A boolean or an array of booleans to pass to `show_multiple_fields()` if the item in the table is pre-colorized. Default false.
Display a single item according to the output arguments .