SourceCollection
FinalYes
A collection of sources (sic!).
This implementation still might be adjusted
Table of Contents
Properties
- $sources : array<int, SourceInterface>
Methods
- __construct() : mixed
- contains() : bool
- Determines whether all sources are contained (in terms of instances and values, but without inference).
- containsTypes() : bool
- Determines whether at least one type matches.
- covers() : bool
- Determines whether all sources are covered (in terms of CSP inference, considering wildcards and similar).
- exclude() : self
- isEmpty() : bool
- merge() : self
- with() : self
- without() : self
- withoutTypes() : self
Properties
$sources read-only
public
array<int, SourceInterface>
$sources
Methods
__construct()
public
__construct(SourceInterface ...$sources) : mixed
Parameters
- $sources : SourceInterface
contains()
Determines whether all sources are contained (in terms of instances and values, but without inference).
public
contains(SourceInterface ...$subjects) : bool
Parameters
- $subjects : SourceInterface
Return values
boolcontainsTypes()
Determines whether at least one type matches.
public
containsTypes(class-string ...$subjectTypes) : bool
Parameters
- $subjectTypes : class-string
Return values
boolcovers()
Determines whether all sources are covered (in terms of CSP inference, considering wildcards and similar).
public
covers(SourceInterface ...$subjects) : bool
Parameters
- $subjects : SourceInterface
Return values
boolexclude()
public
exclude(self $other) : self
Parameters
- $other : self
Return values
selfisEmpty()
public
isEmpty() : bool
Return values
boolmerge()
public
merge(self $other) : self
Parameters
- $other : self
Return values
selfwith()
public
with(SourceInterface ...$subjects) : self
Parameters
- $subjects : SourceInterface
Return values
selfwithout()
public
without(SourceInterface ...$subjects) : self
Parameters
- $subjects : SourceInterface
Return values
selfwithoutTypes()
public
withoutTypes(class-string ...$subjectTypes) : self
Parameters
- $subjectTypes : class-string