63 $this->chain = array_values($chain);
75 $list = array_values($list);
78 foreach ($this->chain as $i => $search) {
79 $proxy_url = $list[$i];
80 if (preg_match(
'/^\/.*\/[ixASUXu]*$/s', $search)) {
81 if (preg_match($search, $proxy_url)) {
83 "Found regexp " . $search .
" matching " . $proxy_url
87 "No regexp match " . $search .
" != " . $proxy_url
93 if (strncasecmp($search, $proxy_url, strlen($search)) == 0) {
95 "Found string " . $search .
" matching " . $proxy_url
99 "No match " . $search .
" != " . $proxy_url
125 return (
sizeof($this->chain) ==
sizeof($list));
An interface for classes that define a list of allowed proxies in front of the current application...
static trace($str)
This method is used to log something in debug mode.
isSizeValid(array $list)
Validate the size of the the list as compared to our chain.
Create styles array
The data for the language used.
A normal proxy-chain definition that lists each level of the chain as either a string or regular expr...
__construct(array $chain)
A chain is an array of strings or regexp strings that will be matched against.
matches(array $list)
Match a list of proxies.