1 | <?php |
||
10 | class TdbmFluidTable |
||
11 | { |
||
12 | /** |
||
13 | * @var FluidSchema|TdbmFluidSchema |
||
14 | */ |
||
15 | private $schema; |
||
16 | /** |
||
17 | * @var FluidTable |
||
18 | */ |
||
19 | private $fluidTable; |
||
20 | /** |
||
21 | * @var NamingStrategyInterface |
||
22 | */ |
||
23 | private $namingStrategy; |
||
24 | |||
25 | /** |
||
26 | * @var array<string, TdbmFluidColumn> |
||
27 | */ |
||
28 | private $tdbmFluidColumns = []; |
||
29 | |||
30 | public function __construct(TdbmFluidSchema $schema, FluidTable $fluidTable, NamingStrategyInterface $namingStrategy) |
||
36 | |||
37 | public function column(string $name): TdbmFluidColumn |
||
44 | |||
45 | public function index(array $columnNames): TdbmFluidTable |
||
50 | |||
51 | public function unique(array $columnNames): TdbmFluidTable |
||
56 | |||
57 | public function primaryKey(array $columnNames, ?string $indexName = null): TdbmFluidTable |
||
62 | |||
63 | public function id(): TdbmFluidColumnOptions |
||
68 | |||
69 | public function uuid(string $version = 'v4'): TdbmFluidColumnOptions |
||
79 | |||
80 | public function timestamps(): self |
||
85 | |||
86 | /** |
||
87 | * @throws FluidSchemaException |
||
88 | */ |
||
89 | public function extends(string $tableName): self |
||
94 | |||
95 | /** |
||
96 | * Adds a "Bean" annotation to the table. |
||
97 | */ |
||
98 | public function customBeanName(string $beanName): self |
||
103 | |||
104 | /** |
||
105 | * Adds a "Type" annotation. |
||
106 | */ |
||
107 | public function graphqlType(): self |
||
112 | |||
113 | /** |
||
114 | * Makes the generated bean implement the interface $interfaceName |
||
115 | * |
||
116 | * @param string $interfaceName The fully qualified name of the PHP interface to implement. |
||
117 | * @return TdbmFluidTable |
||
118 | */ |
||
119 | public function implementsInterface(string $interfaceName): self |
||
124 | |||
125 | /** |
||
126 | * Makes the generated DAO implement the interface $interfaceName |
||
127 | * |
||
128 | * @param string $interfaceName The fully qualified name of the PHP interface to implement. |
||
129 | * @return TdbmFluidTable |
||
130 | */ |
||
131 | public function implementsInterfaceOnDao(string $interfaceName): self |
||
136 | |||
137 | private function getComment(): Comment |
||
144 | |||
145 | private function saveComment(Comment $comment): self |
||
150 | |||
151 | /** |
||
152 | * @param string $annotation |
||
153 | * @param mixed $content |
||
154 | * @param bool $replaceExisting |
||
155 | * @return TdbmFluidTable |
||
156 | */ |
||
157 | public function addAnnotation(string $annotation, $content = null, bool $replaceExisting = true, bool $explicitNull = false): self |
||
163 | |||
164 | public function removeAnnotation(string $annotation): self |
||
170 | |||
171 | public function getDbalTable(): Table |
||
175 | } |
||
176 |