Merged unused search service method
This commit is contained in:
parent
0f112adb05
commit
37fdc3057f
1 changed files with 2 additions and 7 deletions
|
@ -36,7 +36,7 @@ abstract class AbstractSearchService
|
||||||
new Sql\Binding(($page - 1) * $perPage));
|
new Sql\Binding(($page - 1) * $perPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getEntitiesRows($searchQuery, $perPage = null, $page = 1)
|
public static function getEntities($searchQuery, $perPage = null, $page = 1)
|
||||||
{
|
{
|
||||||
$modelClassName = self::getModelClassName();
|
$modelClassName = self::getModelClassName();
|
||||||
$table = $modelClassName::getTableName();
|
$table = $modelClassName::getTableName();
|
||||||
|
@ -48,13 +48,8 @@ abstract class AbstractSearchService
|
||||||
static::decorateCustom($stmt);
|
static::decorateCustom($stmt);
|
||||||
static::decoratePager($stmt, $perPage, $page);
|
static::decoratePager($stmt, $perPage, $page);
|
||||||
|
|
||||||
return Core::getDatabase()->fetchAll($stmt);
|
$rows = Core::getDatabase()->fetchAll($stmt);
|
||||||
}
|
|
||||||
|
|
||||||
public static function getEntities($searchQuery, $perPage = null, $page = 1)
|
|
||||||
{
|
|
||||||
$modelClassName = self::getModelClassName();
|
$modelClassName = self::getModelClassName();
|
||||||
$rows = static::getEntitiesRows($searchQuery, $perPage, $page);
|
|
||||||
return $modelClassName::spawnFromDatabaseRows($rows);
|
return $modelClassName::spawnFromDatabaseRows($rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue