34 lines
653 B
Plaintext
34 lines
653 B
Plaintext
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace ApiPlatform\Core\DataPersister
|
|
{
|
|
/** @template T */
|
|
interface DataPersisterInterface
|
|
{
|
|
/**
|
|
* @param mixed $data
|
|
*/
|
|
public function supports($data): bool;
|
|
|
|
/**
|
|
* @param T $data
|
|
* @return T|void
|
|
*/
|
|
public function persist($data);
|
|
|
|
/**
|
|
* @param T $data
|
|
* @return void
|
|
*/
|
|
public function remove($data);
|
|
}
|
|
|
|
/**
|
|
* @template T
|
|
* @template-extends DataPersisterInterface<T>
|
|
*/
|
|
interface ContextAwareDataPersisterInterface extends DataPersisterInterface { }
|
|
}
|