6 in_array("curl", http\Request\Factory::getAvailableDrivers()) or die ("skip CURL support missing");
12 class MyRequest extends http\Request {}
13 class MyPool extends http\Request\Pool {}
14 class MyShare extends http\Request\DataShare {}
16 class MyFactory extends http\Request\Factory {
17 protected $driver = "curl";
18 protected $persistentHandleId = "My";
19 protected $requestClass = "MyRequest";
20 protected $requestPoolClass = "MyPool";
21 protected $requestDataShareClass = "MyShare";
23 protected $dummy = "foo";
26 $f = new MyFactory(array("driver" => "curl"));
27 $r = $f->createRequest();
28 $p = $f->createPool();
29 $s = $f->createDataShare();
32 array_map("get_class", array($f,$r,$p,$s)),
36 foreach (array("Request", "Pool", "DataShare") as $type) {
38 var_dump((new http\Request\Factory(array("driver" => "nonexistant")))->{"create$type"}());
39 } catch (Exception $e) {
40 echo $e->getMessage(), "\n";
59 requests are not supported by this driver
60 pools are not supported by this driver
61 datashares are not supported by this driver