Lines Matching refs:wrapper
49 * UPDATE_FOPEN: Uses the fopen url wrapper (use file_get_contents).
54 const UPDATE_FOPEN = 'URL-wrapper';
184 * `$arr['wrapper']['option'] = $value` passed to stream_context_create()
384 foreach ($wrappers as $wrapper) {
385 $url = getenv($wrapper.'_proxy');
392 $this->addProxySettings($params['host'], $params['port'], $wrapper, $params['user'], $params['pass']);
402 * @param string $wrapper Wrapper: "http", "https", "ftp", others...
408 public function addProxySettings($server, $port = 3128, $wrapper = 'http', $username = null, $password = null)
410 $settings = array($wrapper => array(
417 $settings[$wrapper]['header'] = 'Proxy-Authorization: Basic '.base64_encode($username.':'.$password);
438 * @param string $wrapper Remove settings from this wrapper only
442 public function clearProxySettings($wrapper = null)
444 $wrappers = isset($wrapper) ? array($wrapper) : array_keys($this->_streamContextOptions);
448 foreach ($wrappers as $wrapper) {
450 // remove wrapper options related to proxy settings
451 if (isset($this->_streamContextOptions[$wrapper]['proxy'])) {
453 unset($this->_streamContextOptions[$wrapper][$option]);
456 // remove wrapper entry if there are no other options left
457 if (empty($this->_streamContextOptions[$wrapper])) {
458 unset($this->_streamContextOptions[$wrapper]);
461 $clearedWrappers[] = $wrapper;