‪TYPO3CMS  10.4
AbstractDataType.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 abstract class ‪AbstractDataType
25 {
31  protected ‪$length = 0;
32 
39  protected ‪$precision = -1;
40 
47  protected ‪$scale = -1;
48 
54  protected ‪$fixed = false;
55 
61  protected ‪$unsigned = false;
62 
68  protected ‪$options = [];
69 
75  protected ‪$values;
76 
80  public function ‪getLength(): int
81  {
82  return ‪$this->length;
83  }
84 
88  public function ‪setLength(int ‪$length)
89  {
90  $this->length = ‪$length;
91  }
92 
96  public function ‪getPrecision(): int
97  {
98  return ‪$this->precision;
99  }
100 
104  public function ‪setPrecision(int ‪$precision)
105  {
106  $this->precision = ‪$precision;
107  }
108 
112  public function ‪getScale(): int
113  {
114  return ‪$this->scale;
115  }
116 
120  public function ‪setScale(int ‪$scale)
121  {
122  $this->scale = ‪$scale;
123  }
124 
128  public function ‪isFixed(): bool
129  {
130  return ‪$this->fixed;
131  }
132 
136  public function ‪setFixed(bool ‪$fixed)
137  {
138  $this->fixed = ‪$fixed;
139  }
140 
144  public function ‪getOptions(): array
145  {
146  return ‪$this->options;
147  }
148 
152  public function ‪setOptions(array ‪$options)
153  {
154  $this->options = ‪$options;
155  }
156 
160  public function ‪isUnsigned(): bool
161  {
162  return ‪$this->unsigned;
163  }
164 
168  public function ‪setUnsigned(bool ‪$unsigned)
169  {
170  $this->unsigned = ‪$unsigned;
171  }
172 
176  public function ‪getValues(): array
177  {
178  return ‪$this->values;
179  }
180 
184  public function ‪setValues(array ‪$values)
185  {
186  $this->values = ‪$values;
187  }
188 }
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getLength
‪int getLength()
Definition: AbstractDataType.php:73
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$options
‪array $options
Definition: AbstractDataType.php:62
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setScale
‪setScale(int $scale)
Definition: AbstractDataType.php:113
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setValues
‪setValues(array $values)
Definition: AbstractDataType.php:177
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType
Definition: AbstractDataType.php:18
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getValues
‪array getValues()
Definition: AbstractDataType.php:169
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$fixed
‪bool $fixed
Definition: AbstractDataType.php:50
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\isUnsigned
‪bool isUnsigned()
Definition: AbstractDataType.php:153
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$precision
‪int $precision
Definition: AbstractDataType.php:37
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getScale
‪int getScale()
Definition: AbstractDataType.php:105
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\isFixed
‪bool isFixed()
Definition: AbstractDataType.php:121
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$length
‪int $length
Definition: AbstractDataType.php:30
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setUnsigned
‪setUnsigned(bool $unsigned)
Definition: AbstractDataType.php:161
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setLength
‪setLength(int $length)
Definition: AbstractDataType.php:81
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setFixed
‪setFixed(bool $fixed)
Definition: AbstractDataType.php:129
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType
Definition: AbstractDataType.php:25
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setPrecision
‪setPrecision(int $precision)
Definition: AbstractDataType.php:97
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getPrecision
‪int getPrecision()
Definition: AbstractDataType.php:89
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$unsigned
‪bool $unsigned
Definition: AbstractDataType.php:56
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$values
‪array $values
Definition: AbstractDataType.php:68
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setOptions
‪setOptions(array $options)
Definition: AbstractDataType.php:145
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getOptions
‪array getOptions()
Definition: AbstractDataType.php:137
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$scale
‪int $scale
Definition: AbstractDataType.php:44