Processes a single item from the `output` array.

@access protected
@param array $output The `output` item.
@param array $value  The field's value.
972632
protected function process_output( $output, $value ) {
		if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
			return;
		}
		$output = wp_parse_args(
			$output,
			[
				'media_query' => 'global',
				'prefix'      => '',
				'units'       => '',
				'suffix'      => '',
			]
		);
		if ( is_array( $value ) ) {
			if ( isset( $output['choice'] ) && $output['choice'] ) {
				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix'];
				return;
			}
			if ( isset( $value['url'] ) ) {
				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix'];
				return;
			}
			return;
		}
		$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix'];
	}
760025
public function setValue($value)
    {
        $this->clear();

        if (!is_array($value)) {
            $value = [$value];
        }

        foreach ($value as $argument) {
            $this[] = $argument;
        }
    }
98240
private static function executeTableShowTableColumn(array $column, $value): void
  {
    $spaces = str_repeat(' ', $column['length'] - mb_strlen((string)$value));

    switch ($column['type'])
    {
      case 1: // tinyint
      case 2: // smallint
      case 3: // int
      case 4: // float
      case 5: // double
      case 8: // bigint
      case 9: // mediumint
      case 246: // decimal
        echo ' ', $spaces.$value, ' ';
        break;

      case 7: // timestamp
      case 10: // date
      case 11: // time
      case 12: // datetime
      case 13: // year
      case 16: // bit
      case 252: // is currently mapped to all text and blob types (MySQL 5.0.51a)
      case 253: // varchar
      case 254: // char
        echo ' ', $value.$spaces, ' ';
        break;

      default:
        throw new FallenException('data type id', $column['type']);
    }
  }
303337
protected function processArray(&$value, $domain)
    {
        if (isset($value['label'])) {
            $label = $value['label'];
            if (is_string($label)) {
                if (empty($label)) {
                    $value = $label;
                } else {
                    $translatable = isset($value['translatable'])
                        ? $value['translatable']
                        : true;
                    $transDomain  = isset($value['translation_domain'])
                        ? $value['translation_domain']
                        : $domain;

                    if (isset($value['parameters'])) {
                        $params = $value['parameters'];
                        if (!empty($params)) {
                            $this->processArray($params, $domain);
                        }
                    } else {
                        $params = [];
                    }

                    $value = $translatable
                        ? $this->translator->trans($label, $params, $transDomain)
                        : strtr($label, $params);
                }
            } else {
                foreach ($value as &$val) {
                    if (is_array($val)) {
                        $this->processArray($val, $domain);
                    }
                }
            }
        } elseif (array_key_exists('label', $value)) {
            $value = null;
        } else {
            foreach ($value as &$val) {
                if (is_array($val)) {
                    $this->processArray($val, $domain);
                }
            }
        }
    }
1360053
protected function apply_value_pattern( $output, $value ) {
		if ( isset( $output['value_pattern'] ) && ! empty( $output['value_pattern'] ) && is_string( $output['value_pattern'] ) ) {
			if ( ! is_array( $value ) ) {
				$value = str_replace( '$', $value, $output['value_pattern'] );
			}
			if ( is_array( $value ) ) {
				foreach ( array_keys( $value ) as $value_k ) {
					if ( is_array( $value[ $value_k ] ) ) {
						continue;
					}
					if ( isset( $output['choice'] ) ) {
						if ( $output['choice'] === $value_k ) {
							$value[ $output['choice'] ] = str_replace( '$', $value[ $output['choice'] ], $output['value_pattern'] );
						}
						continue;
					}
					$value[ $value_k ] = str_replace( '$', $value[ $value_k ], $output['value_pattern'] );
				}
			}
			$value = $this->apply_pattern_replace( $output, $value );
		}
		return $value;
	}
95640
public function hook(OutputInterface $output, array $response)
    {
        $this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
    }
102479
protected function apply_sanitize_callback( $output, $value ) {
		if ( isset( $output['sanitize_callback'] ) && null !== $output['sanitize_callback'] ) {

			// If the sanitize_callback is invalid, return the value.
			if ( ! is_callable( $output['sanitize_callback'] ) ) {
				return $value;
			}
			return call_user_func( $output['sanitize_callback'], $this->value );
		}
		return $value;
	}
688092
protected function processColumnValue($column, $value)
	{
		if (!($column instanceof CDataColumn))
			return;

		if (!array_key_exists($column->name, $this->extendedSummary['columns']))
			return;

		$config = $this->extendedSummary['columns'][$column->name];
		$config['column'] = $column;

		$this->getSummaryOperationInstance($column->name, $config)
			->processValue($value);
	}
73146
protected function process_output( $output, $value ) {
		$output = wp_parse_args(
			$output,
			[
				'media_query' => 'global',
				'element'     => 'body',
				'prefix'      => '',
				'suffix'      => '',
			]
		);

		foreach ( [ 'background-image', 'background-color', 'background-repeat', 'background-position', 'background-size', 'background-attachment' ] as $property ) {

			// See https://github.com/aristath/kirki/issues/1808.
			if ( 'background-color' === $property && isset( $value['background-color'] ) && $value['background-color'] && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
				$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
			}

			if ( isset( $value[ $property ] ) && ! empty( $value[ $property ] ) ) {
				$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
			}
		}
	}
503861
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        try {
            $this->doExecute($input, $output);
        } catch (\Exception $e) {
            $this->writeException($e);
        }
    }
495950
private function processEnclosedField($value, array $option)
    {
        // then, remove enclosure and line feed
        $cell = $this->trimEnclosure($value, $option['enclosure']);
        // replace the escape sequence "" to "
        $cell = $this->unescapeEnclosure($cell, $option['enclosure']);

        $this->setCell($cell);
        $this->col++;
        $this->continue = false;
    }
741568
public Output output(Object value) throws IOException {
        if (value != null) {
            writer.write(value.toString());
        }
        return this;
    }
1167792
def process_output(dest, result)
      return unless result.ok? && should_validate(dest)

      @output.each do |param|
        sym = param[:symbol]
        unless result.key?(sym)
          opts = param[:opts]
          raise ArgumentError, "Missing required value #{sym} in output" unless opts[:optional]
        end
      end
    end
590530
protected function processResult($result)
    {
        $output = Helper::objectToArray($result);

        if (! is_array($output)) {
            throw new Error\Api($output);
        }

        if (isset($output['result'])) {
            return $output;
        }

        if (
            isset($output['request']) &&
            $output['request']['result'] != 1 &&
            $output['request']['result'] !== 'TRUE') {
            throw new Error\Api($output['request']['errorId'] . ' - ' . $output['request']['errorMessage']);
        }

        return $output;
    }
948870
public static function set(array &$array, string $key, $value)
    {
        foreach (\explode('.', $key) as $k) {
            if (!isset($array[$k]) || !\is_array($array[$k])) {
                $array[$k] = [];
            }
            $array = &$array[$k];
        }

        $array = $value;
    }
854520
public function setOutput(OutputInterface $output)
    {
        $this->output = $output;
        $this->stdErr = $output instanceof ConsoleOutputInterface
            ? $output->getErrorOutput()
            : $output;
    }
616933
protected function set_output() {
		if ( empty( $this->output ) ) {
			return;
		}
		if ( ! is_array( $this->output ) ) {
			/* translators: The field ID where the error occurs. */
			_doing_it_wrong( __METHOD__, sprintf( esc_html__( '"output" invalid format in field %s. The "output" argument should be defined as an array of arrays.', 'kirki' ), esc_html( $this->settings ) ), '3.0.10' );
			$this->output = [
				[
					'element' => $this->output,
				],
			];
		}

		// Convert to array of arrays if needed.
		if ( isset( $this->output['element'] ) ) {
			/* translators: The field ID where the error occurs. */
			_doing_it_wrong( __METHOD__, sprintf( esc_html__( '"output" invalid format in field %s. The "output" argument should be defined as an array of arrays.', 'kirki' ), esc_html( $this->settings ) ), '3.0.10' );
			$this->output = [ $this->output ];
		}

		foreach ( $this->output as $key => $output ) {
			if ( empty( $output ) || ! isset( $output['element'] ) ) {
				unset( $this->output[ $key ] );
				continue;
			}
			if ( ! isset( $output['sanitize_callback'] ) && isset( $output['callback'] ) ) {
				$this->output[ $key ]['sanitize_callback'] = $output['callback'];
			}

			// Convert element arrays to strings.
			if ( isset( $output['element'] ) && is_array( $output['element'] ) ) {
				$this->output[ $key ]['element'] = array_unique( $this->output[ $key ]['element'] );
				sort( $this->output[ $key ]['element'] );

				// Trim each element in the array.
				foreach ( $this->output[ $key ]['element'] as $index => $element ) {
					$this->output[ $key ]['element'][ $index ] = trim( $element );
				}
				$this->output[ $key ]['element'] = implode( ',', $this->output[ $key ]['element'] );
			}

			// Fix for https://github.com/aristath/kirki/issues/1659#issuecomment-346229751.
			$this->output[ $key ]['element'] = str_replace( [ "\t", "\n", "\r", "\0", "\x0B" ], ' ', $this->output[ $key ]['element'] );
			$this->output[ $key ]['element'] = trim( preg_replace( '/\s+/', ' ', $this->output[ $key ]['element'] ) );
		}
	}