Launchpad
Launchpad
Launchpad
  • Introduction
  • General
    • Installation
    • Creating a subscriber
    • Contributing
  • Tutorials
    • Beginner documentation
      • Beginner handbook
        • Creating subscribers
        • Wiring subscribers
        • Installing local environment
        • Adding front-end
        • Building the plugin
      • Plugin life circle
        • Activation
        • Deactivation
        • Uninstall
    • Starting with the framework
    • Migrating to Launchpad
    • Notions
      • Framework concepts
        • Inversion of control
        • Subscribers
        • Dispatcher
      • Good practices
        • Hooks
          • Preventing magic constants
          • Decouple features
          • Sanitize filters output
      • Testing
        • Organize tests
  • CLI
    • Commands
    • Creating a command
  • Testing
    • Unit test
    • Fixtures
    • Integration test
  • Container
    • Architecture
    • Parameters
    • Providers
    • Auto wiring
    • Manual wiring
    • Activation/Deactivation
    • Inflectors
  • Modules
    • Definition
    • Listing
      • Action Scheduler
      • BerlinDB
      • Bus
      • Options
      • Renderer
      • Logger
      • Uninstaller
      • Filesystem
      • Front-end
      • Hook extractor
    • Creating a module
Powered by GitBook
On this page
  • General
  • Subscriber loading
  1. Container

Architecture

General

The first when understanding the architecture of a project is to get the general overview of the project and it's purposes.

Unlike most of WordPress plugin if you search inside Launchpad code base you won't be able to find a lot of references to add_action or add_filter methods which are normally an institution in Wordpress plugins.

This is due to the Subscriber based Architecture of the project instead of adding this function of each piece of our code and have mock it back afterwards during tests, we centralised it in one place and automatically add it.

That why most pieces of logic inside the plugin finish by a subscriber.

Subscriber loading

To load these subscribers and to allow us to have IOC we are using league container that is loading inside the inc/plugin.php file inside the core.

Inside the configs/providers.php file we register all Services providers from the app that provides any class that are present inside the plugin.

With this service providers we will then load needed subscribers depending on the context.

PreviousIntegration testNextParameters

Last updated 11 months ago