|
@ -78,6 +78,7 @@ class SearchBuilder { |
|
|
*/ |
|
|
*/ |
|
|
private function makeDriver() |
|
|
private function makeDriver() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
// Check if default driver is being overridden, otherwise
|
|
|
// Check if default driver is being overridden, otherwise
|
|
|
// load the default
|
|
|
// load the default
|
|
|
if ( $this->driverName ){ |
|
|
if ( $this->driverName ){ |
|
@ -86,9 +87,11 @@ class SearchBuilder { |
|
|
$driverName = \Config::get('searchy::default'); |
|
|
$driverName = \Config::get('searchy::default'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Gets the details for the selected driver from the configuration file
|
|
|
// Gets the details for the selected driver from the configuration file
|
|
|
$driverMap = \Config::get("searchy::drivers.$driverName"); |
|
|
$driverMap = \Config::get("searchy::drivers.$driverName"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create a new instance of the selected drivers 'class' and pass
|
|
|
// Create a new instance of the selected drivers 'class' and pass
|
|
|
// through table and fields to search
|
|
|
// through table and fields to search
|
|
|
return new $driverMap['class']( $this->table, $this->searchFields ); |
|
|
return new $driverMap['class']( $this->table, $this->searchFields ); |
|
|