mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-23 09:36:12 +01:00
TASK: Use a single array utility
Instead of only adding a new class for one static method, we extend the existing class to only import a single class. This way we extend the original array utility function collection.
This commit is contained in:
parent
689f293194
commit
7f2249e3ff
6 changed files with 9 additions and 8 deletions
|
@ -21,7 +21,7 @@ namespace Codappix\SearchCore\Configuration;
|
||||||
* 02110-1301, USA.
|
* 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
use Codappix\SearchCore\Utility\ArrayUtility;
|
||||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,8 +26,7 @@ use Codappix\SearchCore\Connection\FacetRequestInterface;
|
||||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||||
use Codappix\SearchCore\Connection\SearchResultInterface;
|
use Codappix\SearchCore\Connection\SearchResultInterface;
|
||||||
use Codappix\SearchCore\Domain\Search\SearchServiceInterface;
|
use Codappix\SearchCore\Domain\Search\SearchServiceInterface;
|
||||||
use Codappix\SearchCore\Utility\ArrayUtility as CustomArrayUtility;
|
use Codappix\SearchCore\Utility\ArrayUtility;
|
||||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a search request used to process an actual search.
|
* Represents a search request used to process an actual search.
|
||||||
|
@ -99,7 +98,7 @@ class SearchRequest implements SearchRequestInterface
|
||||||
public function setFilter(array $filter)
|
public function setFilter(array $filter)
|
||||||
{
|
{
|
||||||
$filter = ArrayUtility::removeArrayEntryByValue($filter, '');
|
$filter = ArrayUtility::removeArrayEntryByValue($filter, '');
|
||||||
$this->filter = CustomArrayUtility::removeEmptyElementsRecursively($filter);
|
$this->filter = ArrayUtility::removeEmptyElementsRecursively($filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasFilter(): bool
|
public function hasFilter(): bool
|
||||||
|
|
|
@ -25,7 +25,7 @@ use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||||
use Codappix\SearchCore\Configuration\ConfigurationUtility;
|
use Codappix\SearchCore\Configuration\ConfigurationUtility;
|
||||||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
use Codappix\SearchCore\Utility\ArrayUtility;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
||||||
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
|
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
|
||||||
|
|
|
@ -29,7 +29,7 @@ use Codappix\SearchCore\Connection\SearchResultInterface;
|
||||||
use Codappix\SearchCore\DataProcessing\Service as DataProcessorService;
|
use Codappix\SearchCore\DataProcessing\Service as DataProcessorService;
|
||||||
use Codappix\SearchCore\Domain\Model\FacetRequest;
|
use Codappix\SearchCore\Domain\Model\FacetRequest;
|
||||||
use Codappix\SearchCore\Domain\Model\SearchResult;
|
use Codappix\SearchCore\Domain\Model\SearchResult;
|
||||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
use Codappix\SearchCore\Utility\ArrayUtility;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,9 @@ namespace Codappix\SearchCore\Utility;
|
||||||
* 02110-1301, USA.
|
* 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ArrayUtility
|
use TYPO3\CMS\Core\Utility\ArrayUtility as Typo3ArrayUtility;
|
||||||
|
|
||||||
|
class ArrayUtility extends Typo3ArrayUtility
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Recursively removes empty array elements.
|
* Recursively removes empty array elements.
|
||||||
|
|
|
@ -25,7 +25,7 @@ SearchCoreConfigurationContainer.php::
|
||||||
|
|
||||||
use Codappix\SearchCore\Configuration\ConfigurationContainer;
|
use Codappix\SearchCore\Configuration\ConfigurationContainer;
|
||||||
use Codappix\SearchCore\Configuration\NoConfigurationException;
|
use Codappix\SearchCore\Configuration\NoConfigurationException;
|
||||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
use Codappix\SearchCore\Utility\ArrayUtility;
|
||||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue