• Full name: \App\Domain\Product\Event\ProductWasCreated
  • Parent class: AggregateChanged
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Properties

id

private \App\Domain\Product\ValueObject\ProductId $id

title

private \Qubus\ValueObjects\StringLiteral\StringLiteral $title

slug

private \Qubus\ValueObjects\StringLiteral\StringLiteral $slug

body

private \Qubus\ValueObjects\StringLiteral\StringLiteral $body

author

private \App\Domain\User\ValueObject\UserId $author

sku

private \Qubus\ValueObjects\StringLiteral\StringLiteral $sku

price

private \Qubus\ValueObjects\Money\Money $price

purchaseUrl

private \Qubus\ValueObjects\StringLiteral\StringLiteral $purchaseUrl

showInMenu

private \Qubus\ValueObjects\Number\IntegerNumber $showInMenu

showInSearch

private \Qubus\ValueObjects\Number\IntegerNumber $showInSearch

featuredImage

private \Qubus\ValueObjects\StringLiteral\StringLiteral $featuredImage

status

private \Qubus\ValueObjects\StringLiteral\StringLiteral $status

attribute

private \App\Shared\ValueObject\ArrayLiteral $attribute

created

private \DateTimeInterface $created

createdGmt

private \DateTimeInterface $createdGmt

published

private \DateTimeInterface $published

publishedGmt

private \DateTimeInterface $publishedGmt

Methods

withData

public static withData(\App\Domain\Product\ValueObject\ProductId $id, \Qubus\ValueObjects\StringLiteral\StringLiteral $title, \Qubus\ValueObjects\StringLiteral\StringLiteral $slug, \Qubus\ValueObjects\StringLiteral\StringLiteral $body, \App\Domain\User\ValueObject\UserId $author, \Qubus\ValueObjects\StringLiteral\StringLiteral $sku, \Qubus\ValueObjects\Money\Money $price, \Qubus\ValueObjects\StringLiteral\StringLiteral $purchaseUrl, \Qubus\ValueObjects\Number\IntegerNumber $showInMenu, \Qubus\ValueObjects\Number\IntegerNumber $showInSearch, \Qubus\ValueObjects\StringLiteral\StringLiteral $featuredImage, \Qubus\ValueObjects\StringLiteral\StringLiteral $status, \DateTimeInterface $created, \DateTimeInterface $createdGmt, \DateTimeInterface $published, \DateTimeInterface $publishedGmt, \App\Shared\ValueObject\ArrayLiteral $attribute): \App\Domain\Product\Event\ProductWasCreated|\Codefy\Domain\EventSourcing\DomainEvent|\Codefy\Domain\EventSourcing\AggregateChanged
  • This method is static. Parameters:
Parameter Type Description
$id \App\Domain\Product\ValueObject\ProductId
$title \Qubus\ValueObjects\StringLiteral\StringLiteral
$slug \Qubus\ValueObjects\StringLiteral\StringLiteral
$body \Qubus\ValueObjects\StringLiteral\StringLiteral
$author \App\Domain\User\ValueObject\UserId
$sku \Qubus\ValueObjects\StringLiteral\StringLiteral
$price \Qubus\ValueObjects\Money\Money
$purchaseUrl \Qubus\ValueObjects\StringLiteral\StringLiteral
$showInMenu \Qubus\ValueObjects\Number\IntegerNumber
$showInSearch \Qubus\ValueObjects\Number\IntegerNumber
$featuredImage \Qubus\ValueObjects\StringLiteral\StringLiteral
$status \Qubus\ValueObjects\StringLiteral\StringLiteral
$created \DateTimeInterface
$createdGmt \DateTimeInterface
$published \DateTimeInterface
$publishedGmt \DateTimeInterface
$attribute \App\Shared\ValueObject\ArrayLiteral

Throws:


productId

public productId(): \App\Domain\Product\ValueObject\ProductId|\Codefy\Domain\Aggregate\AggregateId

Throws:


productTitle

public productTitle(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productSlug

public productSlug(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productBody

public productBody(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productAuthor

public productAuthor(): \App\Domain\User\ValueObject\UserId

Throws:


productSku

public productSku(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productPrice

public productPrice(): \Qubus\ValueObjects\Money\Money

Throws:


productPurchaseUrl

public productPurchaseUrl(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productShowInMenu

public productShowInMenu(): \Qubus\ValueObjects\Number\IntegerNumber

Throws:


productShowInSearch

public productShowInSearch(): \Qubus\ValueObjects\Number\IntegerNumber

Throws:


productFeaturedImage

public productFeaturedImage(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productStatus

public productStatus(): \Qubus\ValueObjects\StringLiteral\StringLiteral

productCreated

public productCreated(): \DateTimeInterface

productCreatedGmt

public productCreatedGmt(): \DateTimeInterface

productPublished

public productPublished(): \DateTimeInterface

productPublishedGmt

public productPublishedGmt(): \DateTimeInterface

productAttribute

public productAttribute(): \App\Shared\ValueObject\ArrayLiteral