public function getDb() {

		if(empty($this->db)) {

			if(empty($this->config->db)) {
				
				try {
					return $this->getVxPDO();
				}
				
				catch(ApplicationException $e) {
					return null;
				}
				
			}

			$config = $this->config->db;

			$this->db = DatabaseInterfaceFactory::create(
				isset($config->type) ? $config->type : 'mysql',
				[
					'host'		=> $config->host,
					'dbname'	=> $config->name,
					'user'		=> $config->user,
					'password'	=> $config->pass,
				]
			);
		}

		return $this->db;

	}
public function getDb() {

		if(empty($this->db)) {

			if(empty($this->config->db)) {
				
				try {
					return $this->getVxPDO();
				}
				
				catch(ApplicationException $e) {
					return null;
				}
				
			}

			$config = $this->config->db;

			$this->db = DatabaseInterfaceFactory::create(
				isset($config->type) ? $config->type : 'mysql',
				[
					'host'		=> $config->host,
					'dbname'	=> $config->name,
					'user'		=> $config->user,
					'password'	=> $config->pass,
				]
			);
		}

		return $this->db;

	}
public function getDb ( ) { if ( empty ( $ this -> db ) ) { if ( empty ( $ this -> config -> db ) ) { try { return $ this -> getVxPDO ( ) ; } catch ( ApplicationException $ e ) { return null ; } } $ config = $ this -> config -> db ; $ this -> db = DatabaseInterfaceFactory :: create ( isset ( $ config -> type ) ? $ config -> type : 'mysql' , [ 'host' => $ config -> host , 'dbname' => $ config -> name , 'user' => $ config -> user , 'password' => $ config -> pass , ] ) ; } return $ this -> db ; }
get default vxPDO instance

this method exists for backwards compatibility
if no 'db' configuration is found, it tries to return a
configured default vxpdo datasource

@return \vxPHP\Database\DatabaseInterface
@throws \Exception
get default vxPDO instance