| 1 |
<?php |
| 2 |
/** |
| 3 |
* Table Index Column. |
| 4 |
* |
| 5 |
* @package SeQura/WC/Dto |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace SeQura\WC\Dto; |
| 9 |
|
| 10 |
/** |
| 11 |
* Table Index Column. |
| 12 |
*/ |
| 13 |
class Table_Index_Column extends Dto { |
| 14 |
|
| 15 |
/** |
| 16 |
* The name of the column to be indexed. |
| 17 |
* |
| 18 |
* @var string |
| 19 |
*/ |
| 20 |
public $name; |
| 21 |
|
| 22 |
/** |
| 23 |
* The character limit for the column if applicable. |
| 24 |
* |
| 25 |
* @var null|int |
| 26 |
*/ |
| 27 |
public $char_limit; |
| 28 |
|
| 29 |
/** |
| 30 |
* Constructor |
| 31 |
* |
| 32 |
* @param string $name The name of the column. |
| 33 |
* @param int|null $char_limit The character limit for the column. Set to null if not applicable. |
| 34 |
*/ |
| 35 |
public function __construct( string $name, $char_limit = null ) { |
| 36 |
$this->name = $name; |
| 37 |
$this->char_limit = ! is_null( $char_limit ) && is_int( $char_limit ) ? $char_limit : null; |
| 38 |
} |
| 39 |
} |
| 40 |
|