SQLConst.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 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 \Zend_Db_Expr;
14 
15 /**
16  * Constant expression used in sql statements
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 class SQLConst {
21 
22  private static $_null = null;
23  private static $_count = null;
24 
25  /**
26  * Get the NULL expression
27  * @return Zend_Db_Expr
28  */
29  public static function NULL() {
30  if (self::$_null == null) {
31  self::$_null = new Zend_Db_Expr('NULL');
32  }
33  return self::$_null;
34  }
35 
36  /**
37  * Get the COUNT(*) expression
38  * @return Zend_Db_Expr
39  */
40  public static function COUNT() {
41  if (self::$_count == null) {
42  self::$_count = new Zend_Db_Expr('COUNT(*)');
43  }
44  return self::$_count;
45  }
46 }
47 ?>
static COUNT()
Get the COUNT(*) expression.
Definition: SQLConst.php:40
static NULL()
Get the NULL expression.
Definition: SQLConst.php:29
Constant expression used in sql statements.
Definition: SQLConst.php:20