1 | <?php |
||
26 | class ClientBuilder |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $baseUri; |
||
33 | |||
34 | /** |
||
35 | * @var AuthenticationInterface |
||
36 | */ |
||
37 | private $authentication; |
||
38 | |||
39 | /** |
||
40 | * @var SerializerInterface |
||
41 | */ |
||
42 | private $serializer; |
||
43 | |||
44 | /** |
||
45 | * @var boolean |
||
46 | */ |
||
47 | private $debug; |
||
48 | |||
49 | |||
50 | /** |
||
51 | * @param string $baseUri |
||
52 | * @param AuthenticationInterface $authenticationMethod |
||
53 | * |
||
54 | * @return ClientBuilder |
||
55 | */ |
||
56 | public static function create($baseUri, AuthenticationInterface $authenticationMethod) |
||
60 | |||
61 | /** |
||
62 | * ClientBuilder constructor. |
||
63 | * |
||
64 | * @param $baseUri |
||
65 | * @param AuthenticationInterface $authentication |
||
66 | */ |
||
67 | private function __construct($baseUri, AuthenticationInterface $authentication) |
||
76 | |||
77 | /** |
||
78 | * @return Client |
||
79 | */ |
||
80 | public function build() |
||
96 | |||
97 | /** |
||
98 | * @param SerializerInterface $serializer |
||
99 | */ |
||
100 | public function setSerializer(SerializerInterface $serializer) |
||
104 | |||
105 | |||
106 | /** |
||
107 | * @param boolean $debug |
||
108 | * |
||
109 | * @return $this |
||
110 | */ |
||
111 | public function setDebug($debug) |
||
116 | |||
117 | private function buildDefaultSerializer() |
||
124 | } |
||
125 |