ILIAS  release_8 Revision v8.24
class.arConcat.php
Go to the documentation of this file.
1<?php
2
24class arConcat extends arStatement
25{
26 protected string $as = '';
30 protected array $fields = [];
31
32 public function asSQLStatement(ActiveRecord $activeRecord, ilDBInterface $db): string
33 {
34 $fields = $this->wrapFields($this->getFields(), $db);
35
36 return ' CONCAT(' . implode(', ', $fields) . ') AS ' . $this->getAs();
37 }
38
39 public function getAs(): string
40 {
41 return $this->as;
42 }
43
44 public function setAs(string $as): void
45 {
46 $this->as = $as;
47 }
48
49 public function getFields(): array
50 {
51 return $this->fields;
52 }
53
54 public function setFields(array $fields): void
55 {
56 $this->fields = $fields;
57 }
58}
Class ActiveRecord.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
array $fields
string $as
setFields(array $fields)
setAs(string $as)
asSQLStatement(ActiveRecord $activeRecord, ilDBInterface $db)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
wrapFields(array $fields, ilDBInterface $db)
$errors fields
Definition: imgupload.php:67
Interface ilDBInterface.