ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
Field.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 class Field
24 {
25  private const _AS = 'as';
26  private const COMBINE_TABLE_AND_FIELD = '.';
27  private string $original_table_name;
28  private string $converted_table_name;
29 
30  public function __construct(private string $table_name, private string $field_name, ?string $alias = null)
31  {
32  $this->converted_table_name = $table_name;
33  $this->original_table_name = $table_name;
34 
35  if (null !== $alias) {
36  $this->converted_table_name = $table_name . ' ' . self::_AS . ' ' . $alias;
37  $this->table_name = $alias;
38  $this->original_table_name = $table_name;
39  }
40  }
41 
42  public function tableName(): string
43  {
45  }
46 
47  public function fieldName(): string
48  {
49  return $this->table_name . self::COMBINE_TABLE_AND_FIELD . $this->field_name;
50  }
51 
52  public function rawFieldName(): string
53  {
54  return $this->field_name;
55  }
56 
57  public function rawTableName(): string
58  {
60  }
61 }
__construct(private string $table_name, private string $field_name, ?string $alias=null)
Definition: Field.php:30