summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Mapping/InverseSideMapping.php
blob: 56dce9f27ecd0e7fd84447a58b73d4e38e54a0ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Mapping;

abstract class InverseSideMapping extends AssociationMapping
{
    /**
     * required for bidirectional associations
     * The name of the field that completes the bidirectional association on
     * the owning side. This key must be specified on the inverse side of a
     * bidirectional association.
     */
    public string $mappedBy;

    final public function backRefFieldName(): string
    {
        return $this->mappedBy;
    }

    /** @return list<string> */
    public function __sleep(): array
    {
        return [
            ...parent::__sleep(),
            'mappedBy',
        ];
    }
}