PHP Class Prooph\EventStore\Aggregate\AggregateType

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

Protected Properties

Property Type Description
$aggregateType string

Public Methods

Method 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

Method Description
__construct ( $aggregateType )

Method Details

__toString() public method

public __toString ( ) : string
return string

assert() public method

public assert ( $aggregateRoot )
$aggregateRoot

equals() public method

public equals ( AggregateType $other ) : boolean
$other AggregateType
return boolean

fromAggregateRoot() public static method

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

fromAggregateRootClass() public static method

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
return AggregateType

fromString() public static method

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

toString() public method

public toString ( ) : string
return string

Property Details

$aggregateType protected_oe property

protected string $aggregateType
return string