This is the database object
object getDatabase([array $aConfig], [bool $bReadOnly])
Database
Parameters:
Optional: $aConfig this is incase your using the class separate, or you want to dicatate special reasons
Optional: $bReadOnly this is mainly used for the instant of config, or for a preset function so that no-one can write anything
Optional: $bReadOnly this is mainly used for the instant of config, or for a preset function so that no-one can write anything
Code:
For getting the database object in a view file
<?php
$oDB = $oHammer->getDatabase();
?>
For getting the database inside a nail
<?php
function __construct(Nails $oNails) {
$this->oDB = $oNails->getDatabase();
}
?>
<?php
$oDB = $oHammer->getDatabase();
?>
For getting the database inside a nail
<?php
function __construct(Nails $oNails) {
$this->oDB = $oNails->getDatabase();
}
?>