-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
馃Ч extract hard dependency introduce new bundle
- Loading branch information
1 parent
646744c
commit 5e0780e
Showing
6 changed files
with
109 additions
and
12 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
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
35 changes: 35 additions & 0 deletions
35
src/FondOfImpala/Zed/CompanyUsersRestApi/Persistence/Expander/CompanyUserQueryExpander.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,35 @@ | ||
<?php | ||
|
||
namespace FondOfImpala\Zed\CompanyUsersRestApi\Persistence\Expander; | ||
|
||
use Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery; | ||
|
||
class CompanyUserQueryExpander implements CompanyUserQueryExpanderInterface | ||
{ | ||
/** | ||
* @var \FondOfOryx\Zed\CompanyUsersRestApiExtension\Dependency\Plugin\QueryExpander\CompanyUserQueryExpanderPluginInterface[]|array | ||
*/ | ||
protected array $expanderPlugins; | ||
|
||
/** | ||
* @param array<\FondOfOryx\Zed\CompanyUsersRestApiExtension\Dependency\Plugin\QueryExpander\CompanyUserQueryExpanderPluginInterface> $expanderPlugins | ||
*/ | ||
public function __construct(array $expanderPlugins) | ||
{ | ||
$this->expanderPlugins = $expanderPlugins; | ||
} | ||
|
||
/** | ||
* @param \Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery $companyUserQuery | ||
* | ||
* @return \Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery | ||
*/ | ||
public function expand(SpyCompanyUserQuery $companyUserQuery): SpyCompanyUserQuery | ||
{ | ||
foreach ($this->expanderPlugins as $expanderPlugin) { | ||
$companyUserQuery = $expanderPlugin->expandCompanyUserQuery($companyUserQuery); | ||
} | ||
|
||
return $companyUserQuery; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...Impala/Zed/CompanyUsersRestApi/Persistence/Expander/CompanyUserQueryExpanderInterface.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,15 @@ | ||
<?php | ||
|
||
namespace FondOfImpala\Zed\CompanyUsersRestApi\Persistence\Expander; | ||
|
||
use Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery; | ||
|
||
interface CompanyUserQueryExpanderInterface | ||
{ | ||
/** | ||
* @param \Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery $companyUserQuery | ||
* | ||
* @return \Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery | ||
*/ | ||
public function expand(SpyCompanyUserQuery $companyUserQuery): SpyCompanyUserQuery; | ||
} |