ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Field.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 class Field
24 {
28  private const _AS = 'as';
32  private const COMBINE_TABLE_AND_FIELD = '.';
33  private string $original_table_name;
34  private string $converted_table_name;
35 
36  public function __construct(private string $table_name, private string $field_name, ?string $alias = null)
37  {
38  $this->converted_table_name = $table_name;
39  $this->original_table_name = $table_name;
40 
41  if (null !== $alias) {
42  $this->converted_table_name = $table_name . ' ' . self::_AS . ' ' . $alias;
43  $this->table_name = $alias;
44  $this->original_table_name = $table_name;
45  }
46  }
47 
48  public function tableName(): string
49  {
51  }
52 
53  public function fieldName(): string
54  {
55  return $this->table_name . self::COMBINE_TABLE_AND_FIELD . $this->field_name;
56  }
57 
58  public function rawFieldName(): string
59  {
60  return $this->field_name;
61  }
62 
63  public function rawTableName(): string
64  {
66  }
67 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(private string $table_name, private string $field_name, ?string $alias=null)
Definition: Field.php:36