-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
363ea00
commit 54659b9
Showing
13 changed files
with
459 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/module-elasticsuite-core/Api/Index/Ingest/PipelineInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
* @copyright 2024 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
namespace Smile\ElasticsuiteCore\Api\Index\Ingest; | ||
|
||
/** | ||
* Pipeline Interface | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
*/ | ||
interface PipelineInterface | ||
{ | ||
/** | ||
* Get name | ||
* | ||
* @return string | ||
*/ | ||
public function getName(): string; | ||
|
||
/** | ||
* Get description | ||
* | ||
* @return string | ||
*/ | ||
public function getDescription(): string; | ||
|
||
/** | ||
* Get processors | ||
* | ||
* @return array | ||
*/ | ||
public function getProcessors(): array; | ||
} |
48 changes: 48 additions & 0 deletions
48
src/module-elasticsuite-core/Api/Index/Ingest/PipelineManagerInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
* @copyright 2024 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
namespace Smile\ElasticsuiteCore\Api\Index\Ingest; | ||
|
||
use Smile\ElasticsuiteCore\Index\Ingest\Pipeline; | ||
|
||
/** | ||
* Pipeline Manager | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
*/ | ||
interface PipelineManagerInterface | ||
{ | ||
/** | ||
* Create ingest pipeline. | ||
* | ||
* @param string $name name pipeline | ||
* @param string $description description pipeline | ||
* @param array $processors processors pipeline | ||
*/ | ||
public function create(string $name, string $description, array $processors): ?Pipeline; | ||
|
||
/** | ||
* Get Pipeline by name. | ||
* | ||
* @param string $name Pipeline name. | ||
*/ | ||
public function get(string $name): ?Pipeline; | ||
|
||
/** | ||
* Create Pipeline by index identifier. | ||
* | ||
* @param string $identifier Index identifier | ||
*/ | ||
public function createByIndexIdentifier(string $identifier): ?Pipeline; | ||
} |
31 changes: 31 additions & 0 deletions
31
src/module-elasticsuite-core/Api/Index/Ingest/PipelineProcessorInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
* @copyright 2024 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
|
||
namespace Smile\ElasticsuiteCore\Api\Index\Ingest; | ||
|
||
/** | ||
* Pipeline Processor | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
*/ | ||
interface PipelineProcessorInterface | ||
{ | ||
/** | ||
* Get Pipeline processors. | ||
* | ||
* @return array | ||
*/ | ||
public function getProcessors(): array; | ||
} |
33 changes: 33 additions & 0 deletions
33
src/module-elasticsuite-core/Api/Index/Ingest/PipelineProcessorProviderInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
* @copyright 2024 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
|
||
namespace Smile\ElasticsuiteCore\Api\Index\Ingest; | ||
|
||
/** | ||
* Pipeline Processor Provider | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
*/ | ||
interface PipelineProcessorProviderInterface | ||
{ | ||
/** | ||
* Get Pipeline processors by index identifier. | ||
* | ||
* @param string $indexIdentifier Index Identifier | ||
* | ||
* @return \Smile\ElasticsuiteCore\Api\Index\Ingest\PipelineProcessorInterface[] | ||
*/ | ||
public function getProcessors(string $indexIdentifier) : array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* Do not edit or add to this file if you wish to upgrade Smile Elastic Suite to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
* @copyright 2024 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
|
||
namespace Smile\ElasticsuiteCore\Index\Ingest; | ||
|
||
use Smile\ElasticsuiteCore\Api\Index\Ingest\PipelineInterface; | ||
|
||
/** | ||
* Ingest Pipeline Implementation | ||
* | ||
* @category Smile | ||
* @package Smile\ElasticsuiteCore | ||
* @author Pierre Gauthier <pierre.gauthier@smile.fr> | ||
*/ | ||
class Pipeline implements PipelineInterface | ||
{ | ||
/** | ||
* @param string $name Pipeline name | ||
* @param string $description Pipeline description | ||
* @param array $processors Pipeline processors | ||
*/ | ||
public function __construct( | ||
protected string $name, | ||
protected string $description, | ||
protected array $processors | ||
) { | ||
} | ||
|
||
/** | ||
* Get name | ||
* | ||
* @return string | ||
*/ | ||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* Get description | ||
* | ||
* @return string | ||
*/ | ||
public function getDescription(): string | ||
{ | ||
return $this->description; | ||
} | ||
|
||
/** | ||
* Get processors | ||
* | ||
* @return array | ||
*/ | ||
public function getProcessors(): array | ||
{ | ||
return $this->processors; | ||
} | ||
} |
Oops, something went wrong.