public function isInstalled()
{
if (!isset($this->_isInstalled)) {
try {
// First check to see if DbConnection has even been initialized, yet.
if (Craft::app()->getComponent('db')) {
// If the db config isn't valid, then we'll assume it's not installed.
if (!Craft::app()->getIsDbConnectionValid()) {
return false;
}
} else {
return false;
}
} catch (\Exception $e) {
return false;
}
$this->_isInstalled = Craft::app()->db->tableExists('info', false);
}
return $this->_isInstalled;
}