forked from GNUsocial/gnu-social
[CORE][DB] Document magic methods
This commit is contained in:
parent
d46a6163a0
commit
0ab8febab3
@ -37,8 +37,8 @@ namespace App\Core\DB;
|
|||||||
use App\Util\Exception\DuplicateFoundException;
|
use App\Util\Exception\DuplicateFoundException;
|
||||||
use App\Util\Exception\NotFoundException;
|
use App\Util\Exception\NotFoundException;
|
||||||
use Doctrine\Common\Collections\Criteria;
|
use Doctrine\Common\Collections\Criteria;
|
||||||
use Doctrine\Common\Collections\Expr\Expression;
|
|
||||||
use Doctrine\Common\Collections\ExpressionBuilder;
|
use Doctrine\Common\Collections\ExpressionBuilder;
|
||||||
|
use Doctrine\ORM\EntityManager;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Doctrine\ORM\Query;
|
use Doctrine\ORM\Query;
|
||||||
@ -47,10 +47,16 @@ use Exception;
|
|||||||
use Functional as F;
|
use Functional as F;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mixin EntityManagerInterface
|
* @mixin EntityManager
|
||||||
* @template T
|
* @template T
|
||||||
*
|
*
|
||||||
* @method T find(string $class, array<string, mixed> $values)
|
* @method static T find(string $class, array<string, mixed> $values) // Finds an Entity by its identifier.
|
||||||
|
* @method static T getReference(string $class, array<string, mixed> $values) // Special cases: It's like find but does not load the object if it has not been loaded yet, it only returns a proxy to the object. (https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/unitofwork.html)
|
||||||
|
* @method static void remove(object $entity) // Removes an entity instance.
|
||||||
|
* @method static T merge(object $entity) // Merges the state of a detached entity into the persistence context
|
||||||
|
* @method static void persist(object $entity) // Tells the EntityManager to make an instance managed and persistent.
|
||||||
|
* @method static bool contains(object $entity) // Determines whether an entity instance is managed in this EntityManager.
|
||||||
|
* @method static void flush() // Flushes the in-memory state of persisted objects to the database.
|
||||||
*/
|
*/
|
||||||
class DB
|
class DB
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user