SQLConst.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\model\mapper;
12 
13 use Laminas\Db\Sql\Predicate\Expression;
14 
15 /**
16  * Constant expression used in sql statements
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 class SQLConst extends Expression {
21 
22  private static $null = null;
23 
24  /**
25  * Get the NULL expression
26  * @return Expression
27  */
28  public static function NULL() {
29  if (self::$null == null) {
30  self::$null = new SQLConst('NULL');
31  }
32  return self::$null;
33  }
34 
35  /**
36  * Get the expression string
37  * @return String
38  */
39  public function __toString() {
40  return $this->getExpression();
41  }
42 }
43 ?>
Constant expression used in sql statements.
Definition: SQLConst.php:20
__toString()
Get the expression string.
Definition: SQLConst.php:39
static NULL()
Get the NULL expression.
Definition: SQLConst.php:28