phpbb/tests/class_loader/cache_mock.php
Igor Wiedler 9329b16ab1 [task/acm-refactor] Refactor the ACM classes to have a common interface.
They are now refered to as cache drivers rather than ACM classes. The
additional utility functions from the original cache class have been
moved to the cache_service. The class loader is now instantiated without
a cache instance and passed one as soon as it is constructed to allow
autoloading the cache classes.

PHPBB3-9983
2011-01-09 23:49:35 +01:00

74 lines
1.1 KiB
PHP

<?php
/**
*
* @package testing
* @version $Id$
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
require '../phpBB/includes/cache/driver/interface.php';
class phpbb_cache_mock implements phpbb_cache_driver_interface
{
private $variables = array();
function get($var_name)
{
if (isset($this->variables[$var_name]))
{
return $this->variables[$var_name];
}
return false;
}
function put($var_name, $value, $ttl = 0)
{
$this->variables[$var_name] = $value;
}
function load()
{
}
function unload()
{
}
function save()
{
}
function tidy()
{
}
function purge()
{
}
function destroy($var_name, $table = '')
{
}
public function _exists($var_name)
{
}
public function sql_load($query)
{
}
public function sql_save($query, &$query_result, $ttl)
{
}
public function sql_exists($query_id)
{
}
public function sql_fetchrow($query_id)
{
}
public function sql_fetchfield($query_id, $field)
{
}
public function sql_rowseek($rownum, $query_id)
{
}
public function sql_freeresult($query_id)
{
}
}