| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong |
| 4 |
namespace Yoast\WP\SEO\Editors\Application\Site; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\Editors\Framework\Site\Post_Site_Information; |
| 7 |
use Yoast\WP\SEO\Editors\Framework\Site\Term_Site_Information; |
| 8 |
|
| 9 |
/** |
| 10 |
* This class manages getting the two site information wrappers. |
| 11 |
* |
| 12 |
* @makePublic |
| 13 |
*/ |
| 14 |
class Website_Information_Repository { |
| 15 |
|
| 16 |
/** |
| 17 |
* The post site information wrapper. |
| 18 |
* |
| 19 |
* @var Post_Site_Information |
| 20 |
*/ |
| 21 |
private $post_site_information; |
| 22 |
|
| 23 |
/** |
| 24 |
* The term site information wrapper. |
| 25 |
* |
| 26 |
* @var Term_Site_Information |
| 27 |
*/ |
| 28 |
private $term_site_information; |
| 29 |
|
| 30 |
/** |
| 31 |
* The constructor. |
| 32 |
* |
| 33 |
* @param Post_Site_Information $post_site_information The post specific wrapper. |
| 34 |
* @param Term_Site_Information $term_site_information The term specific wrapper. |
| 35 |
*/ |
| 36 |
public function __construct( |
| 37 |
Post_Site_Information $post_site_information, |
| 38 |
Term_Site_Information $term_site_information |
| 39 |
) { |
| 40 |
$this->post_site_information = $post_site_information; |
| 41 |
$this->term_site_information = $term_site_information; |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Returns the Post Site Information container. |
| 46 |
* |
| 47 |
* @return Post_Site_Information |
| 48 |
*/ |
| 49 |
public function get_post_site_information(): Post_Site_Information { |
| 50 |
return $this->post_site_information; |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Returns the Term Site Information container. |
| 55 |
* |
| 56 |
* @return Term_Site_Information |
| 57 |
*/ |
| 58 |
public function get_term_site_information(): Term_Site_Information { |
| 59 |
return $this->term_site_information; |
| 60 |
} |
| 61 |
} |
| 62 |
|