‪TYPO3CMS  9.5
AbstractDataType.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
23 abstract class ‪AbstractDataType
24 {
30  protected ‪$length = 0;
31 
38  protected ‪$precision = -1;
39 
46  protected ‪$scale = -1;
47 
53  protected ‪$fixed = false;
54 
60  protected ‪$unsigned = false;
61 
67  protected ‪$options = [];
68 
74  protected ‪$values;
75 
79  public function ‪getLength(): int
80  {
81  return ‪$this->length;
82  }
83 
87  public function ‪setLength(int ‪$length)
88  {
89  $this->length = ‪$length;
90  }
91 
95  public function ‪getPrecision(): int
96  {
97  return ‪$this->precision;
98  }
99 
103  public function ‪setPrecision(int ‪$precision)
104  {
105  $this->precision = ‪$precision;
106  }
107 
111  public function ‪getScale(): int
112  {
113  return ‪$this->scale;
114  }
115 
119  public function ‪setScale(int ‪$scale)
120  {
121  $this->scale = ‪$scale;
122  }
123 
127  public function ‪isFixed(): bool
128  {
129  return ‪$this->fixed;
130  }
131 
135  public function ‪setFixed(bool ‪$fixed)
136  {
137  $this->fixed = ‪$fixed;
138  }
139 
143  public function ‪getOptions(): array
144  {
145  return ‪$this->options;
146  }
147 
151  public function ‪setOptions(array ‪$options)
152  {
153  $this->options = ‪$options;
154  }
155 
159  public function ‪isUnsigned(): bool
160  {
161  return ‪$this->unsigned;
162  }
163 
167  public function ‪setUnsigned(bool ‪$unsigned)
168  {
169  $this->unsigned = ‪$unsigned;
170  }
171 
175  public function ‪getValues(): array
176  {
177  return ‪$this->values;
178  }
179 
183  public function ‪setValues(array ‪$values)
184  {
185  $this->values = ‪$values;
186  }
187 }
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getLength
‪int getLength()
Definition: AbstractDataType.php:72
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$options
‪array $options
Definition: AbstractDataType.php:61
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setScale
‪setScale(int $scale)
Definition: AbstractDataType.php:112
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setValues
‪setValues(array $values)
Definition: AbstractDataType.php:176
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType
Definition: AbstractDataType.php:4
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getValues
‪array getValues()
Definition: AbstractDataType.php:168
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$fixed
‪bool $fixed
Definition: AbstractDataType.php:49
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\isUnsigned
‪bool isUnsigned()
Definition: AbstractDataType.php:152
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$precision
‪int $precision
Definition: AbstractDataType.php:36
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getScale
‪int getScale()
Definition: AbstractDataType.php:104
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\isFixed
‪bool isFixed()
Definition: AbstractDataType.php:120
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$length
‪int $length
Definition: AbstractDataType.php:29
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setUnsigned
‪setUnsigned(bool $unsigned)
Definition: AbstractDataType.php:160
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setLength
‪setLength(int $length)
Definition: AbstractDataType.php:80
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setFixed
‪setFixed(bool $fixed)
Definition: AbstractDataType.php:128
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType
Definition: AbstractDataType.php:24
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setPrecision
‪setPrecision(int $precision)
Definition: AbstractDataType.php:96
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getPrecision
‪int getPrecision()
Definition: AbstractDataType.php:88
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$unsigned
‪bool $unsigned
Definition: AbstractDataType.php:55
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$values
‪array $values
Definition: AbstractDataType.php:67
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\setOptions
‪setOptions(array $options)
Definition: AbstractDataType.php:144
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\getOptions
‪array getOptions()
Definition: AbstractDataType.php:136
‪TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\AbstractDataType\$scale
‪int $scale
Definition: AbstractDataType.php:43