-
-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3485 from phpDocumentor/extract-pipeline-for-docu…
…mentation-set Extract pipeline for documentation set
- Loading branch information
Showing
16 changed files
with
150 additions
and
125 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
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
43 changes: 43 additions & 0 deletions
43
src/phpDocumentor/Pipeline/Stage/ParseApiDocumentationSets.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,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of phpDocumentor. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @link https://phpdoc.org | ||
*/ | ||
|
||
namespace phpDocumentor\Pipeline\Stage; | ||
|
||
use League\Pipeline\Pipeline; | ||
use phpDocumentor\Configuration\VersionSpecification; | ||
|
||
final class ParseApiDocumentationSets | ||
{ | ||
private Pipeline $parseApiDocumentationSetPipeline; | ||
|
||
public function __construct(Pipeline $parseApiDocumentationSetPipeline) | ||
{ | ||
$this->parseApiDocumentationSetPipeline = $parseApiDocumentationSetPipeline; | ||
} | ||
|
||
public function __invoke(Payload $payload): Payload | ||
{ | ||
/** @var VersionSpecification[] $versions */ | ||
$versions = $payload->getConfig()['phpdocumentor']['versions']; | ||
|
||
foreach ($versions as $version) { | ||
foreach ($version->getApi() as $apiSpecification) { | ||
$this->parseApiDocumentationSetPipeline->process( | ||
new Parser\ApiSetPayload($payload->getConfig(), $payload->getBuilder(), $apiSpecification) | ||
); | ||
} | ||
} | ||
|
||
return $payload; | ||
} | ||
} |
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
Oops, something went wrong.