1 <?php
2 /**
3 * @package FrameworkOnFramework
4 * @subpackage query
5 * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
6 * @license GNU General Public License version 2 or later; see LICENSE.txt
7 */
8 // Protect from unauthorized access
9 defined('FOF_INCLUDED') or die;
10
11 /**
12 * FrameworkOnFramework query base class; for compatibility purposes
13 *
14 * @package FrameworkOnFramework
15 * @since 2.1
16 * @deprecated 2.1
17 */
18 abstract class FOFQueryAbstract
19 {
20 /**
21 * Returns a new database query class
22 *
23 * @param FOFDatabaseDriver $db The DB driver which will provide us with a query object
24 *
25 * @return FOFQueryAbstract
26 */
27 public static function &getNew($db = null)
28 {
29 FOFPlatform::getInstance()->logDeprecated('FOFQueryAbstract is deprecated. Use FOFDatabaseQuery instead.');
30
31 if (is_null($db))
32 {
33 $ret = FOFPlatform::getInstance()->getDbo()->getQuery(true);
34 }
35 else
36 {
37 $ret = $db->getQuery(true);
38 }
39
40 return $ret;
41 }
42 }
43