arse/includes/core/dao.inc.php
Emmanuel BENOîT 871d28cd16 Importing bits and pieces
This is the initial import based on a few files I had around.
2012-02-05 12:56:54 +01:00

20 lines
367 B
PHP

<?php
abstract class DAO
{
private $database;
public final function setDatabase( Database $database )
{
if ( $this->database !== null ) {
throw new Exception( "trying to change DAO database" );
}
$this->database = $database;
}
protected final function query( $query , $prepare = false )
{
return $this->database->query( $query , $prepare );
}
}