Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit d3ae333

Browse files
author
Greg Heitz
committed
add method setPortsetProxyPort()
1 parent b69423b commit d3ae333

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/BrowserMob.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ public function getProxyPort()
156156
return $this->bmp->port;
157157
}
158158

159+
/**
160+
* Set current proxy port to use on BrowserMobProxy
161+
*
162+
* @param integer $port Proxy port
163+
*/
164+
public function setProxyPort($port)
165+
{
166+
$prop = new \ReflectionProperty($this->bmp, 'port');
167+
$prop->setAccessible(true);
168+
$prop->setValue($this->bmp, $port);
169+
}
170+
159171
/**
160172
* Open a new proxy on BrowserMobProxy
161173
*

tests/_data/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM ubuntu:14.04
2+
MAINTAINER Greg Heitz <g.heitz@yahoo.fr>
23

34
ENV DEBIAN_FRONTEND noninteractive
45

0 commit comments

Comments
 (0)