Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
server.php
1<?php
10
12
19class Server
20 extends Request
21 implements IRequestFilter
22{
23
24 protected $interestingKeys = array('REQUEST_URI', 'QUERY_STRING', 'SCRIPT_URL', 'SCRIPT_URI', 'PHP_SELF');
25
34 public function filter(array $values, $isReturnChangedOnly = true)
35 {
36 $this->onFilterStarted();
37
38 foreach ($values as $key => &$val)
39 {
40 if (
41 substr($key, 0, 5) === 'HTTP_'
42 || in_array($key, $this->interestingKeys, true)
43 )
44 {
45 $val = $this->filterVar('server', $val, '$_SERVER["'.$key.'"]');
46 }
47
48 }
49 unset($val);
50
51 $this->onFilterFinished();
52
53 if (!$isReturnChangedOnly || isset($this->changedContext['server']))
54 return $values;
55 else
56 return null;
57 }
58}
filterVar($context, $value, $name)
Definition request.php:196
filter(array $values, $isReturnChangedOnly=true)
Definition server.php:34