> For the complete documentation index, see [llms.txt](https://wirebox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wirebox.ortusbooks.com/5/usage/wirebox-event-model/wirebox-events.md).

# WireBox Events

WireBox's offers a wide gamut of life cycle events that are announced at certain points in execution time. Below are the current events announced by the Injector `wirebox.system.ioc.Injector`.

| Event                      | Data                                                     | Description                                                                                                                                                                               |
| -------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| afterInjectorConfiguration | **injector** : The calling injector reference            | Called right after the injector has been fully configured for operation.                                                                                                                  |
| beforeInstanceCreation     | **mapping** : The mapping called to be created           | Called right before an object mapping is built via our internal object builders or custom scope builders.                                                                                 |
| afterInstanceInitialized   | **mapping** : The mapping called to be created           | Called after an object mapping gets constructed and initialized. The mapping has NOT been placed on a scope yet and no DI/AOP has been performed yet                                      |
| afterInstanceCreation      | **mapping** : The mapping called to be created           | Called once the object has been fully created, initialized, stored, and DI/AOP performed on it. It is about to be returned to the caller via its getInstance() method.                    |
| beforeInstanceInspection   | **mapping** : The mapping that is about to be processed. | Called whenever an object has been requested and its metadata has not been processed or discovered. In this interception point you can influence the metadata discovery.                  |
| afterInstanceInspection    | **mapping** : The mapping that is about to be processed. | Called after an object mapping has been completely processed with its DI metadata discovery. This is your last chance to change or modify the DI data in the mapping before it is cached. |
| beforeInjectorShutdown     | **injector** : The calling injector reference            | Called right before the Injector instance is shutdown.                                                                                                                                    |
| afterInjectorShutdown      | **injector** : The calling injector reference            | Called right after the Injector instance is shutdown.                                                                                                                                     |
| beforeInstanceAutowire     | **injector** : The calling injector reference            | Called right after the instance has been created and initialized, but before DI wiring is done.                                                                                           |
| afterInstanceAutowire      | **injector** : The calling injector reference            | Called right after the instance has been created, initialized and DI has been completed on it.                                                                                            |

> **Note** Please see our [CacheBox](http://cachebox.ortusbooks.com) documentation to see all of CacheBox's events.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wirebox.ortusbooks.com/5/usage/wirebox-event-model/wirebox-events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
