src/rest-api/class-papi-rest-api-settings.php
public function get_setting( $key, $value ) {
		$property = null;

		foreach ( (array) $this->entries as $entry ) {
			if ( $property = $entry->get_property( $key ) ) {
				break;
			}
		}

		if ( is_null( $property ) ) {
			return $value;
		}

		$value = papi_get_option( $key );

		return $property->rest_prepare_value( $value );
	}
public function get_setting( $key, $value ) {
		$property = null;

		foreach ( (array) $this->entries as $entry ) {
			if ( $property = $entry->get_property( $key ) ) {
				break;
			}
		}

		if ( is_null( $property ) ) {
			return $value;
		}

		$value = papi_get_option( $key );

		return $property->rest_prepare_value( $value );
	}
Get setting value for a property.

@param  string $key
@param  string $value

@return mixed