# Mapping Initiators

Ok, now that we know how to configure WireBox, let's get into the fun stuff of object mapping. How do we do this? By using our DSL mapping initiators that tell WireBox how to start the object registration process. You will then concatenate the initiators with some DSL destinations methods, DI data, etc to tell WireBox all the information it might need to construct, wire and persist the object. Here are the DSL initiators:

| Method Signature                                                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `map(alias)`                                                                                                    | The method that starts the mapping process. You pass in a mapping name or a list of names to start registering                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `mapPath(path)`                                                                                                 | Map a CFC instantiation path. This method internally delivers a two-fold punch of doing `map('CFCFileName').to(path)`. This is a quick way to map a CFC instantiation path that uses the name of the CFC as the mapping name                                                                                                                                                                                                                                                                                                                                                                           |
| `mapDirectory(packagePath,[include],[exclude], [influence], [filter], [ namespace],[prepend], [process=false])` | A cool method that tells WireBox to automatically register ALL the CFCs found recursively in that instantiation package path. All CFCs will be registered using their CFC names as the mapping names and WireBox will inspect all the CFCs immediately for DI metadata. The **include** and **exclude** arguments can be used for inclusions/exclusions lists via regex. The influence argument can be a UDF or closure that will affect the iterating registrations of objects. The filter argument can be a UDF or closure that will filter out or in the CFCs found, an include/exclude on steroids |
| `unMap(alias)`                                                                                                  | Unmap/delete a mapping in the binder                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `with(alias)`                                                                                                   | This method is a utility method that retrieves the alias mapping so you can start concatenating methods for that specific mapping. Basically putting it into a workable context                                                                                                                                                                                                                                                                                                                                                                                                                        |

{% hint style="danger" %}
**Caution** From the methods we have seen above only the `map()` and `with()` methods require a DSL destination.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wirebox.ortusbooks.com/2/configuration/mapping-dsl/mapping-initiators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
