* @throws SqlException If an 'SQL error' occurs
*/
public function querySelect ($tableName, LocalSearchCriteria $searchInstance) {
* @throws SqlException If an 'SQL error' occurs
*/
public function querySelect ($tableName, LocalSearchCriteria $searchInstance) {
// The result is null by any errors
$resultData = NULL;
// Create full path name
$pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
// The result is null by any errors
$resultData = NULL;
// Create full path name
$pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
- // A 'select' query is not that easy on local files, so first try to
- // find the 'table' which is in fact a directory on the server
+ /*
+ * A 'select' query is not that easy on local files, so first try to
+ * find the 'table' which is in fact a directory on the server
+ */
try {
// Get a directory pointer instance
$directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($pathName));
try {
// Get a directory pointer instance
$directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($pathName));
// Read the directory with some exceptions
while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
// Read the directory with some exceptions
while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
// Does the extension match?
if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
// Skip this file!
// Does the extension match?
if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
// Skip this file!