Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Event Bindings

> **Related interfaces:**
> - [HasEventBindings](/packages/event/interfaces/has-event-bindings) — The interface you implement
> - [ActionBindingStrategy](/packages/event/interfaces/action-binding-strategy) — Executes the bindings
> - [Event](/packages/event/interfaces/event) — Creating event classes

## What are Event Bindings?

Event bindings are like adapters that connect your application's events to a platform's native event system. Think of
Expand Down Expand Up @@ -229,4 +234,18 @@ Remember:
- Document platform events clearly
- Use service classes for complex transformations

With event bindings, your application can easily "speak" to any platform while keeping its own code clean and portable.
With event bindings, your application can easily "speak" to any platform while keeping its own code clean and portable.

---

## Related Documentation

### Event Package Interfaces
- [HasEventBindings](/packages/event/interfaces/has-event-bindings) — Detailed interface documentation
- [ActionBindingStrategy](/packages/event/interfaces/action-binding-strategy) — How bindings are executed
- [Event](/packages/event/interfaces/event) — Creating event classes that bindings produce

### Related Guides
- [Event Listeners](event-listeners) — Handling events once they're bound
- [Event Package Overview](/packages/event/introduction) — Full event system documentation
- [Best Practices](/packages/event/patterns/best-practices) — Transformer patterns, testing strategies
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Event Listeners in PHPNomad

> **Related interfaces:**
> - [HasListeners](/packages/event/interfaces/has-listeners) — Declaring which events to listen for
> - [CanHandle](/packages/event/interfaces/can-handle) — Creating handler classes
> - [Event](/packages/event/interfaces/event) — Creating event classes

Event listeners are like friendly observers in your code that wait for specific things to happen, and then spring into
action when they do. Think of them as helpful assistants who are always ready to respond when something important occurs
in your application.
Expand Down Expand Up @@ -250,4 +255,20 @@ maintain but also easier to test and modify. Each listener can focus on its spec
any services it needs.

Think of event listeners as specialized workers in your application - each one has access to exactly the tools they
need (through dependency injection) and knows exactly what to do when certain events occur.
need (through dependency injection) and knows exactly what to do when certain events occur.

---

## Related Documentation

### Event Package Interfaces
- [HasListeners](/packages/event/interfaces/has-listeners) — Detailed interface documentation for declaring listeners
- [CanHandle](/packages/event/interfaces/can-handle) — Creating handler classes with dependency injection
- [Event](/packages/event/interfaces/event) — Creating event classes
- [EventStrategy](/packages/event/interfaces/event-strategy) — Broadcasting events programmatically

### Related Guides
- [Event Bindings](event-binding) — Connecting platform events to your application
- [Event Package Overview](/packages/event/introduction) — Full event system documentation
- [Best Practices](/packages/event/patterns/best-practices) — Handler patterns, testing strategies, anti-patterns
- [Logger Package](/packages/logger/introduction) — LoggerStrategy interface used in handler examples
10 changes: 9 additions & 1 deletion public/docs/core-concepts/bootstrapping/initializers/facades.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,12 @@ Consider alternatives when:

Remember: Facades in PHPNomad combine the singleton pattern with static access to provide convenient, globally
accessible services while maintaining the flexibility to work across different platforms. The key is to use them
thoughtfully and always remember to include the `WithInstance` trait.
thoughtfully and always remember to include the `WithInstance` trait.

---

## Related Documentation

- [Singleton Package](/packages/singleton/introduction) — WithInstance trait used by all facades
- [Logger Package](/packages/logger/introduction) — LoggerStrategy interface shown in examples
- [Event Package](/packages/event/introduction) — EventStrategy interface for event facades
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ Now that you have built your first datastore, explore these topics to deepen you
- **[Query Building](../packages/database/query-building)** — Build complex queries with conditions
- **[Junction Tables](../packages/database/junction-tables)** — Implement many-to-many relationships
- **[Advanced Patterns](../advanced/advanced-patterns)** — Soft deletes, audit trails, and optimization
- **[Logger Package](../packages/logger/introduction)** — LoggerStrategy interface for handler logging

---

Expand Down
Loading