SlotFlow API Documentation

RuleSet
in package

FinalYes

Composable container for slot and edge rules.

Tags
template

Table of Contents

Properties

$rules  : array<string|int, mixed>

Methods

__construct()  : mixed
all()  : array<int, EdgeRule>|array<int, SlotRule>
Recursively flatten the RuleSet and return all rules as a single array.
from()  : self
meta()  : self
Apply $attribute metadata to all rules in the RuleSet.

Properties

$rules

public array<string|int, mixed> $rules

Methods

all()

Recursively flatten the RuleSet and return all rules as a single array.

public all() : array<int, EdgeRule>|array<int, SlotRule>
Tags
psalm-return

list<TRuleType>

Return values
array<int, EdgeRule>|array<int, SlotRule>

a flat list of all rules contained in the RuleSet, including those in nested RuleSets

meta()

Apply $attribute metadata to all rules in the RuleSet.

public meta(array<string, mixed> $attributes) : self

This method recursively applies the metadata to any nested RuleSets as well.

Parameters
$attributes : array<string, mixed>

The metadata attributes to apply

Tags
psalm-return

self<TRuleType>

Return values
self

A new RuleSet instance with the metadata applied to all contained rules


        
On this page

Search results