BrowserNetworkTrait.php in Zircon Profile 8
File
vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNetworkTrait.php
View source
<?php
namespace Zumba\GastonJS\Browser;
use Zumba\GastonJS\NetworkTraffic\Request;
trait BrowserNetworkTrait {
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;
}
public function clearNetworkTraffic() {
return $this
->command('clear_network_traffic');
}
}