$78 GRAYBYTE WORDPRESS FILE MANAGER $16

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/academy.bravetech.rw/wp-content/plugins/mls-on-the-fly/docs/

HOME
Current File : /home/bravetechrwanda/academy.bravetech.rw/wp-content/plugins/mls-on-the-fly/docs//mapping.md
## Detailed Explanation of Parsing Methods with Examples

### `compile` Method

This method orchestrates the parsing of different expressions and conditions within your mapping values, applying various parsing functions to interpret and transform the data as specified.

### `parseVariables` Method

Replaces placeholders within the string with actual data values. This method is essential for direct data replacement and can also be used to concatenate multiple fields into a single string.

**Example of Concatenation:**
```json
{
    "full_address": {
        "mapping": "{City}, {State}, {Country}"
    }
}
```
This combines the city, state, and country fields into a single string for the `full_address`.

### `parseNestedArray` Method

Extracts values from nested arrays or objects using a path notation, which is particularly useful for accessing data within complex structured data.

**Example:**
```json
{
    "custom_field": {
        "mapping": "{Address.City}"
    }
}
```
Fetches the `City` value from a nested `Address` object.

### `parseIf` Method

Executes conditional logic directly within the mapping to dynamically determine values based on other data fields.

**Example:**
```json
{
    "post_status": {
        "mapping": "IF('{Availability}' == 'Available', 'publish', 'pending')"
    }
}
```
Sets the `post_status` based on the `Availability` field.

### `parseMethod` Method

Allows for the invocation of specific methods, potentially with arguments, to perform more complex or reusable logic.

**Example:**
```json
{
    "complex_calculation_field": {
        "mapping": "METHOD(CustomClass::calculateValue({BaseValue}, 10))"
    }
}
```
Calls a static method to perform a calculation based on the `BaseValue`.

### `parseSum`, `parseMin`, `parseMax`, `parseLower`, `parseUpper`

These functions handle arithmetic operations and string transformations directly within the mappings.

**Example of `parseSum`:**
```json
{
    "total_cost": {
        "mapping": "SUM({Item1}, {Item2}, {Item3})"
    }
}
```
Calculates the sum of three items and maps it to `total_cost`.

**Example of `parseMin` and `parseMax`:**
```json
{
    "temperature_range": {
        "mapping": "MIN({TempJan}, {TempFeb}, {TempMar}), MAX({TempJan}, {TempFeb}, {TempMar})"
    }
}
```
Finds the minimum and maximum temperatures.

**Example of `parseLower` and `parseUpper`:**
```json
{
    "normalized_city": {
        "mapping": "UPPER({City})"
    },
    "search_key": {
        "mapping": "LOWER({Keyword})"
    }
}
```
Converts city names to uppercase for normalization and keywords to lowercase for search functionalities.

### `parseInArray` Method

Verifies if a specified value exists within an array.

**Example:**
```json
{
    "feature_available": {
        "mapping": "IN_ARRAY({Features}, 'Pool')"
    }
}
```
Checks if 'Pool' is listed in the `Features` array.

### `parseContains` Method

Determines if a string contains a specified substring, useful for keyword checks within text fields.

**Example:**
```json
{
    "has_keyword": {
        "mapping": "CONTAINS({Description}, 'luxury')"
    }
}
```
Verifies if the description contains the word 'luxury'.

Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 May 2026 9.51 AM
bravetechrwanda / bravetechrwanda
0755
add-integration.md
4.635 KB
6 May 2026 9.46 AM
bravetechrwanda / bravetechrwanda
0644
mapping.md
3.218 KB
6 May 2026 9.46 AM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF