tflori/orm

just another orm...

View the Project on GitHub tflori/orm

Build Status Test Coverage Maintainability Latest Stable Version Total Downloads

» API Reference » ORM\Entity\EventHandlers

ORM\Entity\EventHandlers

Table of Contents

Abstract

Methods

ORM\Entity\EventHandlers::onChange

public function onChange(
    string $attribute, 
    mixed $oldValue, 
    mixed $value, 
): mixed
Empty event handler

Get called when something is changed with magic setter.

Returns mixed  
Parameters
Parameter Type Description
$attribute string The variable that got changed.merge(node.inheritedProperties)
$oldValue mixed The old value of the variable
$value mixed The new value of the variable

ORM\Entity\EventHandlers::onChange

↑ top


ORM\Entity\EventHandlers::onInit

public function onInit(bool $new): mixed
Empty event handler

Get called when the entity get initialized.

Returns mixed  
Parameters
Parameter Type Description
$new bool Whether or not the entity is new or from database

ORM\Entity\EventHandlers::onInit

↑ top


ORM\Entity\EventHandlers::postPersist

public function postPersist(): mixed
Empty event handler

Get called after the entity got inserted in database.

Returns mixed  

ORM\Entity\EventHandlers::postPersist

↑ top


ORM\Entity\EventHandlers::postUpdate

public function postUpdate(): mixed
Empty event handler

Get called after the entity got updated in database.

Returns mixed  

ORM\Entity\EventHandlers::postUpdate

↑ top


ORM\Entity\EventHandlers::prePersist

public function prePersist(): mixed
Empty event handler

Get called before the entity get inserted in database.

Returns mixed  

ORM\Entity\EventHandlers::prePersist

↑ top


ORM\Entity\EventHandlers::preUpdate

public function preUpdate(): mixed
Empty event handler

Get called before the entity get updated in database.

Returns mixed  

ORM\Entity\EventHandlers::preUpdate

↑ top