| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong |
| 4 |
namespace Yoast\WP\SEO\Llms_Txt\Application\Markdown_Builders; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\Llms_Txt\Domain\Markdown\Sections\Description; |
| 7 |
use Yoast\WP\SEO\Llms_Txt\Infrastructure\Markdown_Services\Description_Adapter; |
| 8 |
|
| 9 |
/** |
| 10 |
* The builder of the description section. |
| 11 |
*/ |
| 12 |
class Description_Builder { |
| 13 |
|
| 14 |
/** |
| 15 |
* The description adapter. |
| 16 |
* |
| 17 |
* @var Description_Adapter |
| 18 |
*/ |
| 19 |
protected $description_adapter; |
| 20 |
|
| 21 |
/** |
| 22 |
* Class constructor. |
| 23 |
* |
| 24 |
* @param Description_Adapter $description_adapter The description adapter. |
| 25 |
*/ |
| 26 |
public function __construct( |
| 27 |
Description_Adapter $description_adapter |
| 28 |
) { |
| 29 |
$this->description_adapter = $description_adapter; |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Builds the description section. |
| 34 |
* |
| 35 |
* @return Description The description section. |
| 36 |
*/ |
| 37 |
public function build_description(): Description { |
| 38 |
return $this->description_adapter->get_description(); |
| 39 |
} |
| 40 |
} |
| 41 |
|