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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Mapping;
trait JoinColumnProperties
{
/**
* @var string|null
* @readonly
*/
public $name;
/**
* @var string
* @readonly
*/
public $referencedColumnName = 'id';
/**
* @var bool
* @readonly
*/
public $unique = false;
/**
* @var bool
* @readonly
*/
public $nullable = true;
/**
* @var mixed
* @readonly
*/
public $onDelete;
/**
* @var string|null
* @readonly
*/
public $columnDefinition;
/**
* Field name used in non-object hydration (array/scalar).
*
* @var string|null
* @readonly
*/
public $fieldName;
/**
* @var array<string, mixed>
* @readonly
*/
public $options = [];
/**
* @param mixed $onDelete
* @param array<string, mixed> $options
*/
public function __construct(
?string $name = null,
string $referencedColumnName = 'id',
bool $unique = false,
bool $nullable = true,
$onDelete = null,
?string $columnDefinition = null,
?string $fieldName = null,
array $options = []
) {
$this->name = $name;
$this->referencedColumnName = $referencedColumnName;
$this->unique = $unique;
$this->nullable = $nullable;
$this->onDelete = $onDelete;
$this->columnDefinition = $columnDefinition;
$this->fieldName = $fieldName;
$this->options = $options;
}
}
|