-
Notifications
You must be signed in to change notification settings - Fork 879
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
Showing
20 changed files
with
1,123 additions
and
213 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
61 changes: 61 additions & 0 deletions
61
src/editors/application/site/website-information-repository.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,61 @@ | ||
<?php | ||
|
||
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong | ||
namespace Yoast\WP\SEO\Editors\Application\Site; | ||
|
||
use Yoast\WP\SEO\Editors\Framework\Site\Post_Site_Information; | ||
use Yoast\WP\SEO\Editors\Framework\Site\Term_Site_Information; | ||
|
||
/** | ||
* This class manages getting the two site information wrappers. | ||
* | ||
* @makePublic | ||
*/ | ||
class Website_Information_Repository { | ||
|
||
/** | ||
* The post site information wrapper. | ||
* | ||
* @var Post_Site_Information $post_site_information | ||
*/ | ||
private $post_site_information; | ||
|
||
/** | ||
* The term site information wrapper. | ||
* | ||
* @var Term_Site_Information $term_site_information | ||
*/ | ||
private $term_site_information; | ||
|
||
/** | ||
* The constructor. | ||
* | ||
* @param Post_Site_Information $post_site_information The post specific wrapper. | ||
* @param Term_Site_Information $term_site_information The term specific wrapper. | ||
*/ | ||
public function __construct( | ||
Post_Site_Information $post_site_information, | ||
Term_Site_Information $term_site_information | ||
) { | ||
$this->post_site_information = $post_site_information; | ||
$this->term_site_information = $term_site_information; | ||
} | ||
|
||
/** | ||
* Returns the Post Site Information container. | ||
* | ||
* @return Post_Site_Information | ||
*/ | ||
public function get_post_site_information(): Post_Site_Information { | ||
return $this->post_site_information; | ||
} | ||
|
||
/** | ||
* Returns the Term Site Information container. | ||
* | ||
* @return Term_Site_Information | ||
*/ | ||
public function get_term_site_information(): Term_Site_Information { | ||
return $this->term_site_information; | ||
} | ||
} |
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,21 @@ | ||
<?php | ||
|
||
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. | ||
namespace Yoast\WP\SEO\Editors\Domain\Site; | ||
|
||
interface Site_Information_Interface { | ||
|
||
/** | ||
* Returns specific site information together with the generic site information. | ||
* | ||
* @return array<string|string,string[]> | ||
*/ | ||
public function get_site_information(): array; | ||
|
||
/** | ||
* Returns specific site information together with the generic site information compatible with a legacy way. | ||
* | ||
* @return array<string|string,string[]> | ||
*/ | ||
public function get_legacy_site_information(): array; | ||
} |
Oops, something went wrong.