Composes roles of the same kind.

This implements a non-commutative composition operator for the \FeaturePhp\Collaboration\Role class. A composer is only applied to roles of the composer's kind. Arbitrary refinements are possible, though the typical use case is implemented by \FeaturePhp\Collaboration\ClassComposer.

package Default

 Methods

Creates a composer from a kind.

fromKind(string $kind) : \FeaturePhp\Collaboration\Composer
Static

Parameters

$kind

string

Returns

\FeaturePhp\Collaboration\Composer

Returns a map from all composer kinds to class names.

getComposerMap() : array<mixed,string>
Static

Returns

array<mixed,string>

Returns the refined file's content.

getContent() : \FeaturePhp\File\FileContent

Returns

\FeaturePhp\File\FileContent

Returns the composer's kind.

getKind() : string

Returns

string

Returns a new composer containing a role's refinements.

refine(\FeaturePhp\Collaboration\Role $role) : \FeaturePhp\Collaboration\Composer

Parameters

$role

\FeaturePhp\Collaboration\Role

Returns

\FeaturePhp\Collaboration\Composer

Returns the class names of all composers.

getComposers() : array<mixed,string>
Static

Returns

array<mixed,string>