Immocaster_Data_Mysql::__construct PHP Method

__construct() public method

Verbindung zur Datenbank aufbauen und Tabelle erzeugen, sofern diese noch nicht existiert.
public __construct ( $aConnection, $sTableName ) : boolean
return boolean
    public function __construct($aConnection, $sTableName)
    {
        if ($sTableName) {
            $this->_sTableName = $sTableName;
        }
        if ($this->connectDatabase($aConnection)) {
            if (!$this->getDataTable()) {
                if ($this->setDataTable()) {
                    return true;
                }
            } else {
                $this->updateDataTableFields();
                return true;
            }
        }
        return false;
    }