infinito/application/symfony/src/Attribut/VersionAttributInterface.php

29 lines
655 B
PHP
Raw Normal View History

2018-10-25 20:42:52 +02:00
<?php
2018-10-29 19:01:00 +01:00
2019-01-20 10:41:58 +01:00
namespace App\Attribut;
2018-10-25 20:42:52 +02:00
/**
2018-10-29 19:01:00 +01:00
* Entities which implement this interface can lock stuff on an optimistic base.
*
2018-10-25 20:42:52 +02:00
* @see https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/transactions-and-concurrency.html
* @see https://en.wikipedia.org/wiki/Optimistic_concurrency_control
2018-10-29 19:01:00 +01:00
*
2018-10-25 20:42:52 +02:00
* @author kevinfrantz
*/
interface VersionAttributInterface
{
/**
2018-10-29 19:01:00 +01:00
* Returns the revision version of the entity.
*
2018-10-25 20:42:52 +02:00
* @return int
*/
2018-10-29 19:01:00 +01:00
public function getVersion(): int;
2018-10-25 20:42:52 +02:00
/**
2018-10-29 19:01:00 +01:00
* Sets the revision version of the entity.
*
2018-10-25 20:42:52 +02:00
* @param int $version
*/
2018-10-29 19:01:00 +01:00
public function setVersion(int $version): void;
2018-10-25 20:42:52 +02:00
}