forked from Triquanta/libizi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFactoryInterface.php
More file actions
39 lines (33 loc) · 886 Bytes
/
Copy pathFactoryInterface.php
File metadata and controls
39 lines (33 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @file
* Contains \Triquanta\IziTravel\DataType\FactoryInterface.
*/
namespace Triquanta\IziTravel\DataType;
interface FactoryInterface
{
/**
* Creates a new instances from izi.TRAVEL's API's JSON output.
*
* This method must also validate the JSON, if a schema is available.
*
* @param string $json
*
* @return static
*
* @throws \Triquanta\IziTravel\DataType\FactoryException
* Thrown when the argument is invalid.
*/
public static function createFromJson($json);
/**
* Creates a new instances from izi.TRAVEL's API's decoded JSON output.
*
* @param \stdClass $data
*
* @return static
*
* @throws \Triquanta\IziTravel\DataType\FactoryException
* Thrown when the argument is invalid.
*/
public static function createFromData(\stdClass $data);
}