diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:38:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:38:04 +0000 |
commit | 1ff5c35de5dbd70a782875a91dd2232fd01b002b (patch) | |
tree | 77d9ce5e1bf78b3e6ef79f8f6e7861e2ced3c09b /vendor/ipl/orm/src/AliasedExpression.php | |
parent | Initial commit. (diff) | |
download | icinga-php-library-upstream/0.10.1.tar.xz icinga-php-library-upstream/0.10.1.zip |
Adding upstream version 0.10.1.upstream/0.10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/ipl/orm/src/AliasedExpression.php')
-rw-r--r-- | vendor/ipl/orm/src/AliasedExpression.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/ipl/orm/src/AliasedExpression.php b/vendor/ipl/orm/src/AliasedExpression.php new file mode 100644 index 0000000..ed733a2 --- /dev/null +++ b/vendor/ipl/orm/src/AliasedExpression.php @@ -0,0 +1,36 @@ +<?php + +namespace ipl\Orm; + +use ipl\Sql\Expression; + +class AliasedExpression extends Expression +{ + /** @var string */ + protected $alias; + + /** + * Create a new database expression + * + * @param string $alias The alias to use for the expression, this is expected to be quoted and qualified + * @param string $statement The statement of the expression + * @param ?array $columns The columns used by the expression + * @param mixed ...$values The values for the expression + */ + public function __construct(string $alias, string $statement, array $columns = null, ...$values) + { + parent::__construct($statement, $columns, ...$values); + + $this->alias = $alias; + } + + /** + * Get this expression's alias + * + * @return string + */ + public function getAlias(): string + { + return $this->alias; + } +} |