1 | <?php |
||
18 | class GoutteDriverFactory implements IMinkDriverFactory |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Returns driver name, that can be used in browser configuration. |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | 10 | public function getDriverName() |
|
30 | |||
31 | /** |
||
32 | * Returns default values for browser configuration. |
||
33 | * |
||
34 | * @return array |
||
35 | */ |
||
36 | 1 | public function getDriverDefaults() |
|
45 | |||
46 | /** |
||
47 | * Returns a new driver instance according to the browser configuration. |
||
48 | * |
||
49 | * @param BrowserConfiguration $browser The browser configuration. |
||
50 | * |
||
51 | * @return DriverInterface |
||
52 | * @throws \RuntimeException When driver isn't installed. |
||
53 | */ |
||
54 | 1 | public function createDriver(BrowserConfiguration $browser) |
|
76 | |||
77 | /** |
||
78 | * Builds Guzzle 4 client. |
||
79 | * |
||
80 | * @param array $parameters Parameters. |
||
81 | * |
||
82 | * @return \GuzzleHttp\Client |
||
83 | */ |
||
84 | private function _buildGuzzle4Client(array $parameters) |
||
93 | |||
94 | /** |
||
95 | * Builds Guzzle 3 client. |
||
96 | * |
||
97 | * @param array $parameters Parameters. |
||
98 | * |
||
99 | * @return \Guzzle\Http\Client |
||
100 | */ |
||
101 | private function _buildGuzzle3Client(array $parameters) |
||
108 | |||
109 | /** |
||
110 | * Determines Goutte client version. |
||
111 | * |
||
112 | * @return boolean |
||
113 | */ |
||
114 | private function _isGoutte1() |
||
124 | |||
125 | } |
||
126 |