PHP Class Prooph\EventStore\Aggregate\AggregateType

Author: Alexander Miertsch ([email protected])
Afficher le fichier Open project: prooph/event-store Class Usage Examples

Protected Properties

Свойство Type Description
$aggregateType string

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
__construct ( $aggregateType )

Method Details

__toString() public méthode

public __toString ( ) : string
Résultat string

assert() public méthode

public assert ( $aggregateRoot )
$aggregateRoot

equals() public méthode

public equals ( AggregateType $other ) : boolean
$other AggregateType
Résultat boolean

fromAggregateRoot() public static méthode

Use this factory when aggregate type should be detected based on given aggregate root
public static fromAggregateRoot ( mixed $eventSourcedAggregateRoot ) : AggregateType
$eventSourcedAggregateRoot mixed
Résultat AggregateType

fromAggregateRootClass() public static méthode

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
Résultat AggregateType

fromString() public static méthode

Use this factory when the aggregate type is not equal to the aggregate root class
public static fromString ( $aggregateTypeString ) : AggregateType
$aggregateTypeString
Résultat AggregateType

toString() public méthode

public toString ( ) : string
Résultat string

Property Details

$aggregateType protected_oe property

protected string $aggregateType
Résultat string