-
Notifications
You must be signed in to change notification settings - Fork 39
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
5 changed files
with
91 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Jkphl\Micrometa\Ports\Item; | ||
|
||
/** | ||
* Hides all other methods that ItemListInterface inherits from PHP core. | ||
* | ||
* Prefer typehinting against this facade over the actual interface. | ||
* | ||
* @see ItemListInterface | ||
*/ | ||
interface ItemListFacade extends \Countable | ||
{ | ||
/** | ||
* Return an object representation of the item list | ||
* | ||
* @return \stdClass Micro information items | ||
* @api | ||
*/ | ||
public function toObject(); | ||
|
||
/** | ||
* Filter the items by item type(s) | ||
* | ||
* @param array ...$types Item types | ||
* | ||
* @return ItemInterface[] Items matching the requested types | ||
* @api | ||
*/ | ||
public function getItems(...$types); | ||
|
||
/** | ||
* Return the first item, optionally of particular types | ||
* | ||
* @param array ...$types Item types | ||
* | ||
* @return ItemInterface Item | ||
* @api | ||
*/ | ||
public function getFirstItem(...$types); | ||
} |
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