Importing bits and pieces
This is the initial import based on a few files I had around.
This commit is contained in:
commit
871d28cd16
20 changed files with 1994 additions and 0 deletions
includes/core
20
includes/core/dao.inc.php
Normal file
20
includes/core/dao.inc.php
Normal 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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue