12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Framework\Data;
- /**
- * Class SearchResultProcessorFactory
- */
- class SearchResultProcessorFactory
- {
- const DEFAULT_INSTANCE_NAME = \Magento\Framework\Data\SearchResultProcessor::class;
- /**
- * Object Manager instance
- *
- * @var \Magento\Framework\ObjectManagerInterface
- */
- protected $objectManager;
- /**
- * Factory constructor
- *
- * @param \Magento\Framework\ObjectManagerInterface $objectManager
- */
- public function __construct(
- \Magento\Framework\ObjectManagerInterface $objectManager
- ) {
- $this->objectManager = $objectManager;
- }
- /**
- * Create class instance with specified parameters
- *
- * @param AbstractSearchResult $collection
- * @return SearchResultProcessor
- */
- public function create(AbstractSearchResult $collection)
- {
- return $this->objectManager->create(static::DEFAULT_INSTANCE_NAME, ['searchResult' => $collection]);
- }
- }
|