Maslosoft Signals Logo Maslosoft Signals Documentation
Wireless Cross-Component Communication

Edit

Configuration

When using default settings configuration is not nessesary.

Configurable options

Property Documentation
$extractor

Extractor configuration

$filters

Filters configuration. This filters will be applied to every emit. This property should contain array of class names implementing filters.

$ignoreDirs

Directories to ignore while scanning

$io

Input/Output configuration, at minimum it should contain class name for builder input output interface. It can also contain array configurable options for IO class.

$paths

This paths will be searched for SlotFor and SignalFor annotations.

TODO Autodetect based on composer autoload

$runtimePath

Runtime path is directory where config cache from yml file will be stored. Path is relative to project root. This must be writable by command line user.

$sorters

Sorters configuration.

Configuration types

Signals can be configured by directly setting up named instance, by configuration adapters or via signals.yml file.

Direct configuration

To directly configure - instantiate signals - with optional instance name. Then set available public properties to required values and then call init.

Configuration via adapters

For more details about adaptes visit EmbeDi project documentation.

Configuration via signals.yml

All options available in Signal can also be configured in signals.yml file in project root.

Example configuration file:

# Default configuration file
extractor:
   class: Maslosoft\Signals\Builder\Addendum

# Builder extractor configuration
# Input output configuration
io:
   class: Maslosoft\Signals\Builder\IO\PhpFile
   runtimePath: runtime
   generatedPath: generated
# Paths to search for signals
paths:
   - vendor
   - src