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