Importing bits and pieces

This is the initial import based on a few files I had around.
This commit is contained in:
Emmanuel BENOîT 2012-02-05 12:56:54 +01:00
commit 871d28cd16
20 changed files with 1994 additions and 0 deletions
includes/core

20
includes/core/dao.inc.php Normal file
View file

@ -0,0 +1,20 @@
<?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 );
}
}