1 | <?php |
||
13 | class Driver_Simple_RequestFactory_HTTP implements Driver_Simple_RequestFactory |
||
14 | { |
||
15 | /** |
||
16 | * The user agent to be used when performing the requests |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $_user_agent = 'Spiderling Simple Driver'; |
||
20 | |||
21 | /** |
||
22 | * The last visited url address |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $_current_url; |
||
26 | |||
27 | /** |
||
28 | * Getter / Setter for the user agent, used when performing the requests |
||
29 | * @param string $user_agent |
||
30 | * @return string|Driver_Simple_RequestFactory_HTTP |
||
31 | */ |
||
32 | 2 | public function user_agent($user_agent = NULL) |
|
33 | { |
||
34 | 2 | if ($user_agent !== NULL) |
|
35 | { |
||
36 | 1 | $this->_user_agent = $user_agent; |
|
37 | 1 | return $this; |
|
38 | } |
||
39 | 2 | return $this->_user_agent; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get the url of the last request |
||
44 | * @return string |
||
45 | */ |
||
46 | 1 | public function current_url() |
|
50 | |||
51 | /** |
||
52 | * Get the path (no protocol or host) of the last request |
||
53 | * @return [type] [description] |
||
|
|||
54 | */ |
||
55 | 1 | public function current_path() |
|
61 | |||
62 | /** |
||
63 | * Perform the request, follow redirects, return the response |
||
64 | * @param string $method |
||
65 | * @param string $url |
||
66 | * @param array $post |
||
67 | * @return string |
||
68 | */ |
||
69 | 1 | public function execute($method, $url, array $post = array()) |
|
94 | } |
||
95 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.