PHP Класс Prooph\EventStore\Aggregate\AggregateType

Автор: Alexander Miertsch ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$aggregateType string

Открытые методы

Метод Описание
__toString ( ) : string
assert ( $aggregateRoot )
equals ( AggregateType $other ) : boolean
fromAggregateRoot ( mixed $eventSourcedAggregateRoot ) : AggregateType Use this factory when aggregate type should be detected based on given aggregate root
fromAggregateRootClass ( string $aggregateRootClass ) : AggregateType Use this factory when aggregate type equals to aggregate root class The factory makes sure that the aggregate root class exists.
fromString ( $aggregateTypeString ) : AggregateType Use this factory when the aggregate type is not equal to the aggregate root class
toString ( ) : string

Приватные методы

Метод Описание
__construct ( $aggregateType )

Описание методов

__toString() публичный метод

public __toString ( ) : string
Результат string

assert() публичный метод

public assert ( $aggregateRoot )
$aggregateRoot

equals() публичный метод

public equals ( AggregateType $other ) : boolean
$other AggregateType
Результат boolean

fromAggregateRoot() публичный статический метод

Use this factory when aggregate type should be detected based on given aggregate root
public static fromAggregateRoot ( mixed $eventSourcedAggregateRoot ) : AggregateType
$eventSourcedAggregateRoot mixed
Результат AggregateType

fromAggregateRootClass() публичный статический метод

Use this factory when aggregate type equals to aggregate root class The factory makes sure that the aggregate root class exists.
public static fromAggregateRootClass ( string $aggregateRootClass ) : AggregateType
$aggregateRootClass string
Результат AggregateType

fromString() публичный статический метод

Use this factory when the aggregate type is not equal to the aggregate root class
public static fromString ( $aggregateTypeString ) : AggregateType
$aggregateTypeString
Результат AggregateType

toString() публичный метод

public toString ( ) : string
Результат string

Описание свойств

$aggregateType защищенное свойство

protected string $aggregateType
Результат string