Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.38 KB

File metadata and controls

43 lines (26 loc) · 1.38 KB

Loading

External Discovery

This package does not scan the filesystem and does not discover classes on its own.

Discovery is expected to happen outside the package, usually through:

  • liquidrazor/file-locator
  • liquidrazor/class-locator

That boundary keeps this library focused on event infrastructure instead of source scanning.

Metadata Input

The loading path works with DiscoveredClass, a value object that carries the metadata needed for classification:

  • class name
  • symbol kind
  • abstract flag
  • implemented interfaces

That metadata mirrors the kind of information a class discovery package can produce without requiring this package to parse source files itself.

Loader Responsibility

DiscoveredEventLoader is responsible for:

  • accepting discovered class metadata
  • rejecting non-DiscoveredClass inputs
  • validating and classifying each candidate
  • routing the resolved event into the correct registry

It does not decide what files to scan or how classes are found.

Validator And Resolver Role

The current loader delegates classification to StrictEventValidator, which implements EventValidatorInterface. Because that contract extends EventFamilyResolverInterface, the validator also serves as the family resolver in the current implementation.

Related: