PHP Class My\Model\User

Inheritance: extends Prooph\EventSourcing\AggregateRoot
Afficher le fichier Open project: prooph/event-sourcing Class Usage Examples

Méthodes publiques

Méthode Description
changeName ( $newName )
name ( ) : string
nameNew ( string $username ) : User ARs should be created via static factory methods
userId ( ) : Rhumsaa\Uuid\Uuid

Méthodes protégées

Méthode Description
aggregateId ( ) : string Every AR needs a hidden method that returns the identifier of the AR as a string
whenUserWasCreated ( UserWasCreated $event ) Each applied event needs a corresponding handler method.
whenUserWasRenamed ( UserWasRenamed $event )

Method Details

aggregateId() protected méthode

Every AR needs a hidden method that returns the identifier of the AR as a string
protected aggregateId ( ) : string
Résultat string representation of the unique identifier of the aggregate root

changeName() public méthode

public changeName ( $newName )
$newName

name() public méthode

public name ( ) : string
Résultat string

nameNew() public static méthode

ARs should be created via static factory methods
public static nameNew ( string $username ) : User
$username string
Résultat User

userId() public méthode

public userId ( ) : Rhumsaa\Uuid\Uuid
Résultat Rhumsaa\Uuid\Uuid

whenUserWasCreated() protected méthode

The naming convention is: when[:ShortEventName]
protected whenUserWasCreated ( UserWasCreated $event )
$event UserWasCreated

whenUserWasRenamed() protected méthode

protected whenUserWasRenamed ( UserWasRenamed $event )
$event UserWasRenamed