-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce dependency on getdkan/contracts (#23)
- Loading branch information
Showing
6 changed files
with
38 additions
and
12 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,28 @@ | ||
<?php | ||
|
||
namespace Procrastinator; | ||
|
||
/** | ||
* Interface to hydrate JSON into PHP variables. | ||
* | ||
* This interface is similar to \JsonSerializable in that we can 'hydrate' JSON | ||
* into PHP structures. | ||
* | ||
* @see \Procrastinator\HydratableTrait | ||
* @see \JsonSerializable | ||
*/ | ||
interface HydratableInterface extends \JsonSerializable | ||
{ | ||
/** | ||
* Hydrate some JSON into a PHP object or array or other variable. | ||
* | ||
* @param string $json | ||
* The JSON to process. | ||
* @param $instance | ||
* (Optional) Create a new instance without invoking the constructor. | ||
* | ||
* @return mixed | ||
* The hydrated data structure. | ||
*/ | ||
public static function hydrate(string $json, $instance = null); | ||
} |
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