From 9dbb0d4b5a9b227c11ec449801fa91df52ce9f68 Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Thu, 20 Jun 2024 13:08:10 +0000 Subject: [PATCH 1/3] updated LazyListeners (#51) and navigation (#52) Signed-off-by: Eric Richer eric.richer@vistoconsulting.com --- doc/book/lazy-listeners/intro.md | 4 +- .../lazy-listeners/lazy-event-listener.md | 2 +- .../lazy-listeners/lazy-listener-aggregate.md | 2 +- doc/book/lazy-listeners/lazy-listener.md | 6 +-- mkdocs.yml | 49 +++++++++---------- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/doc/book/lazy-listeners/intro.md b/doc/book/lazy-listeners/intro.md index 9f430192..e8594082 100644 --- a/doc/book/lazy-listeners/intro.md +++ b/doc/book/lazy-listeners/intro.md @@ -18,8 +18,8 @@ The feature consists of three classes: ## Preparation In order to use the lazy listeners feature, you will need to install -container-interop, if you haven't already: +PSR-11 Container, if you haven't already: ```bash -$ composer require container-interop/container-interop +$ composer require psr/container ``` diff --git a/doc/book/lazy-listeners/lazy-event-listener.md b/doc/book/lazy-listeners/lazy-event-listener.md index aea1f6d3..c91204f9 100644 --- a/doc/book/lazy-listeners/lazy-event-listener.md +++ b/doc/book/lazy-listeners/lazy-event-listener.md @@ -23,7 +23,7 @@ As an example, let's assume: - we want to attach it to the event `dispatch`, - at priority 100. -Additionally, we'll assume that we have a container-interop instance in the +Additionally, we'll assume that we have a PSR-11 container instance in the variable `$container` and an event manager in the variable `$events`. You could create the lazy event listener as follows: diff --git a/doc/book/lazy-listeners/lazy-listener-aggregate.md b/doc/book/lazy-listeners/lazy-listener-aggregate.md index f2e549c0..ae3c8048 100644 --- a/doc/book/lazy-listeners/lazy-listener-aggregate.md +++ b/doc/book/lazy-listeners/lazy-listener-aggregate.md @@ -7,7 +7,7 @@ number of listeners as lazy listeners. Similar to a [LazyListener](lazy-listener.md) or [LazyEventListener](lazy-event-listener.md), the `LazyListenerAggregate` accepts -a definition (or, rather, set of definitions) a container-interop instance, and +a definition (or, rather, set of definitions), a PSR-11 container instance, and optionall an `$env` array to its constructor. Unlike either, however, the definition provided is an array of definitions to diff --git a/doc/book/lazy-listeners/lazy-listener.md b/doc/book/lazy-listeners/lazy-listener.md index f6d7ca9e..474507a7 100644 --- a/doc/book/lazy-listeners/lazy-listener.md +++ b/doc/book/lazy-listeners/lazy-listener.md @@ -10,7 +10,7 @@ To create a `LazyListener` instance, you must pass to its constructor: - a *definition* of the listener; this is an array defining: - a `listener` key, with the name of the listener service to pull from the container. - a `method` key, with the name of the method to invoke on the listener instance. -- a *container*; this is a [container-interop](https://github.com/container-interop/container-interop), +- a *container*; this is a [PSR-11 container](https://github.com/php-fig/container), such as provided by [laminas-servicemanager](https://github.com/laminas/laminas-servicemanager), [Aura.Di](https://github.com/auraphp/Aura.Di), etc. @@ -24,10 +24,10 @@ As an example, let's assume: - We have a listener registered in our container with the service name `My\Application\Listener`. - The specific listener method is `onDispatch`. -- I have a container-interop instance in the variable `$container` and an event +- You have a PSR-11 container instance in the variable `$container` and an event manager in the variable `$events`. -I might then create and attach my lazy listener as follows: +You might then create and attach your lazy listener as follows: ```php use My\Application\Listener; diff --git a/mkdocs.yml b/mkdocs.yml index 50af5f86..1bd5bbdc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,30 +1,29 @@ docs_dir: doc/book site_dir: doc/html nav: - - Home: index.md - - Intro: intro.md - - "Quick Start": quick-start.md - - Tutorial: tutorial.md - - Examples: examples.md - - Reference: - - "Wildcard Listeners": wildcard-listeners.md - - "Listener Aggregates": aggregates.md - - "Lazy Listeners": - - Intro: lazy-listeners/intro.md - - LazyListener: lazy-listeners/lazy-listener.md - - LazyEventListener: lazy-listeners/lazy-event-listener.md - - LazyListenerAggregate: lazy-listeners/lazy-listener-aggregate.md - - "EventManager API": api.md - - "Intercepting Filters": intercepting-filters.md - - "Application Integration": - - "Usage in a laminas-mvc Application": application-integration/usage-in-a-laminas-mvc-application.md - - "Migration Guide": - - Intro: migration/intro.md - - "Removed Functionality": migration/removed.md - - "Changed Functionality": migration/changed.md + - Home: index.md + - Intro: intro.md + - Quick Start: quick-start.md + - Tutorial: tutorial.md + - Examples: examples.md + - Wildcard Listeners: wildcard-listeners.md + - Listener Aggregates: aggregates.md + - Lazy Listeners: + - Intro: lazy-listeners/intro.md + - LazyListener: lazy-listeners/lazy-listener.md + - LazyEventListener: lazy-listeners/lazy-event-listener.md + - LazyListenerAggregate: lazy-listeners/lazy-listener-aggregate.md + - EventManager API: api.md + - Intercepting Filters: intercepting-filters.md + - Application Integration: + - Usage in a laminas-mvc Application: application-integration/usage-in-a-laminas-mvc-application.md + - Migration Guide: + - Intro: migration/intro.md + - Removed Functionality: migration/removed.md + - Changed Functionality: migration/changed.md +repo_url: https://github.com/laminas/laminas-eventmanager +site_description: Implement events, signal slots, aspects, and observers! site_name: laminas-eventmanager -site_description: 'Implement events, signal slots, aspects, and observers!' -repo_url: 'https://github.com/laminas/laminas-eventmanager' extra: - project: Components - show_special_homepage: true + project: Components + show_special_homepage: true \ No newline at end of file From f258afa5b9cd58f81a743ba2123e517406b80df7 Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Thu, 20 Jun 2024 13:21:06 +0000 Subject: [PATCH 2/3] Added missing files and fix mkdos.yml Signed-off-by: Eric Richer eric.richer@vistoconsulting.com --- doc/book/lazy-listeners/intro.md | 2 +- doc/book/lazy-listeners/lazy-listener.md | 2 +- mkdocs.yml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/book/lazy-listeners/intro.md b/doc/book/lazy-listeners/intro.md index e8594082..8c3da4e4 100644 --- a/doc/book/lazy-listeners/intro.md +++ b/doc/book/lazy-listeners/intro.md @@ -18,7 +18,7 @@ The feature consists of three classes: ## Preparation In order to use the lazy listeners feature, you will need to install -PSR-11 Container, if you haven't already: +[PSR-11](https://www.php-fig.org/psr/psr-11/) Container, if you haven't already: ```bash $ composer require psr/container diff --git a/doc/book/lazy-listeners/lazy-listener.md b/doc/book/lazy-listeners/lazy-listener.md index 474507a7..98a3f0f6 100644 --- a/doc/book/lazy-listeners/lazy-listener.md +++ b/doc/book/lazy-listeners/lazy-listener.md @@ -10,7 +10,7 @@ To create a `LazyListener` instance, you must pass to its constructor: - a *definition* of the listener; this is an array defining: - a `listener` key, with the name of the listener service to pull from the container. - a `method` key, with the name of the method to invoke on the listener instance. -- a *container*; this is a [PSR-11 container](https://github.com/php-fig/container), +- a *container*; this is a [PSR-11](https://www.php-fig.org/psr/psr-11/) container, such as provided by [laminas-servicemanager](https://github.com/laminas/laminas-servicemanager), [Aura.Di](https://github.com/auraphp/Aura.Di), etc. diff --git a/mkdocs.yml b/mkdocs.yml index 1bd5bbdc..b776cf0d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,4 +26,5 @@ site_description: Implement events, signal slots, aspects, and observers! site_name: laminas-eventmanager extra: project: Components - show_special_homepage: true \ No newline at end of file + show_special_homepage: true + \ No newline at end of file From a39f49258fff96a679b857850eacd04b3378881f Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Thu, 20 Jun 2024 13:27:52 +0000 Subject: [PATCH 3/3] Fixing lint errors in mkdocs.yml Signed-off-by: Eric Richer eric.richer@vistoconsulting.com --- mkdocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index b776cf0d..85204cf9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -27,4 +27,3 @@ site_name: laminas-eventmanager extra: project: Components show_special_homepage: true - \ No newline at end of file