trait BrowserNetworkTrait in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNetworkTrait.php \Zumba\GastonJS\Browser\BrowserNetworkTrait
Trait BrowserNetworkTrait @package Zumba\GastonJS\Browser
Hierarchy
- trait \Zumba\GastonJS\Browser\BrowserNetworkTrait
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserNetworkTrait.php, line 11
Namespace
Zumba\GastonJS\BrowserView source
trait BrowserNetworkTrait {
/**
* Get all the network traffic that the page have created
* @return array
*/
public function networkTraffic() {
$networkTraffic = $this
->command('network_traffic');
$requestTraffic = array();
if (count($networkTraffic) === 0) {
return null;
}
foreach ($networkTraffic as $traffic) {
$requestTraffic[] = new Request($traffic["request"], $traffic["responseParts"]);
}
return $requestTraffic;
}
/**
* Clear the network traffic data stored on the phantomjs code
* @return mixed
*/
public function clearNetworkTraffic() {
return $this
->command('clear_network_traffic');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrowserNetworkTrait:: |
public | function | Clear the network traffic data stored on the phantomjs code | |
BrowserNetworkTrait:: |
public | function | Get all the network traffic that the page have created |