ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
GuzzleHttp\Psr7 Namespace Reference

Data Structures

class  AppendStream
 Reads from multiple streams, one after the other. More...
 
class  BufferStream
 Provides a buffer stream that can be written to to fill a buffer, and read from to remove bytes from the buffer. More...
 
class  CachingStream
 Stream decorator that can cache previously read bytes from a sequentially read stream. More...
 
class  DroppingStream
 Stream decorator that begins dropping data once the size of the underlying stream becomes too full. More...
 
class  FnStream
 Compose stream implementations based on a hash of functions. More...
 
class  InflateStream
 Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. More...
 
class  LazyOpenStream
 Lazily reads or writes to a file that is opened only after an IO operation take place on the stream. More...
 
class  LimitStream
 Decorator used to return only a subset of a stream. More...
 
class  MultipartStream
 Stream that when read returns bytes for a streaming multipart or multipart/form-data stream. More...
 
class  NoSeekStream
 Stream decorator that prevents a stream from being seeked. More...
 
class  PumpStream
 Provides a read only stream that pumps data from a PHP callable. More...
 
class  Request
 PSR-7 request implementation. More...
 
class  Response
 PSR-7 response implementation. More...
 
class  ServerRequest
 Server-side HTTP request. More...
 
class  Stream
 
class  StreamWrapper
 Converts Guzzle streams into PHP stream resources. More...
 
class  UploadedFile
 
class  Uri
 PSR-7 URI implementation. More...
 
class  UriNormalizer
 Provides methods to normalize and compare URIs. More...
 
class  UriResolver
 Resolves a URI reference in the context of a base URI and the opposite way. More...
 

Functions

 str (MessageInterface $message)
 Returns the string representation of an HTTP message. More...
 
 uri_for ($uri)
 Returns a UriInterface for the given value. More...
 
 stream_for ($resource='', array $options=[])
 Create a new stream based on the input type. More...
 
 parse_header ($header)
 Parse an array of header values containing ";" separated data into an array of associative arrays representing the header key value pair data of the header. More...
 
 normalize_header ($header)
 Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values. More...
 
 modify_request (RequestInterface $request, array $changes)
 Clone and modify a request with the given changes. More...
 
 rewind_body (MessageInterface $message)
 Attempts to rewind a message body and throws an exception on failure. More...
 
 copy_to_string (StreamInterface $stream, $maxLen=-1)
 Copy the contents of a stream into a string until the given number of bytes have been read. More...
 
 copy_to_stream (StreamInterface $source, StreamInterface $dest, $maxLen=-1)
 Copy the contents of a stream into another stream until the given number of bytes have been read. More...
 
 hash (StreamInterface $stream, $algo, $rawOutput=false)
 Calculate a hash of a Stream. More...
 
 readline (StreamInterface $stream, $maxLength=null)
 Read a line from the stream up to the maximum allowed buffer length. More...
 
 parse_request ($message)
 Parses a request message string into a request object. More...
 
 parse_response ($message)
 Parses a response message string into a response object. More...
 
 parse_query ($str, $urlEncoding=true)
 Parse a query string into an associative array. More...
 
 build_query (array $params, $encoding=PHP_QUERY_RFC3986)
 Build a query string from an array of key value pairs. More...
 
 mimetype_from_filename ($filename)
 Determines the mimetype of a file by looking at its extension. More...
 
 mimetype_from_extension ($extension)
 Maps a file extensions to a mimetype. More...
 
 _parse_message ($message)
 Parses an HTTP message into an associative array. More...
 
 _parse_request_uri ($path, array $headers)
 Constructs a URI for an HTTP request message. More...
 
 _caseless_remove ($keys, array $data)
 
 getProtocolVersion ()
 
 withProtocolVersion ($version)
 
 getHeaders ()
 
 hasHeader ($header)
 
 getHeader ($header)
 
 getHeaderLine ($header)
 
 withHeader ($header, $value)
 
 withAddedHeader ($header, $value)
 
 withoutHeader ($header)
 
 getBody ()
 
 withBody (StreamInterface $body)
 
 setHeaders (array $headers)
 
 trimHeaderValues (array $values)
 Trims whitespace from the header values. More...
 

Variables

trait MessageTrait
 Trait implementing functionality common to requests and responses. More...
 
 $headerNames = []
 
 $protocol = '1.1'
 
 $stream
 PHP stream implementation. More...
 

Function Documentation

◆ _caseless_remove()

GuzzleHttp\Psr7\_caseless_remove (   $keys,
array  $data 
)

Definition at line 813 of file functions.php.

References $key, $keys, and $result.

Referenced by GuzzleHttp\Psr7\modify_request().

814 {
815  $result = [];
816 
817  foreach ($keys as &$key) {
818  $key = strtolower($key);
819  }
820 
821  foreach ($data as $k => $v) {
822  if (!in_array(strtolower($k), $keys)) {
823  $result[$k] = $v;
824  }
825  }
826 
827  return $result;
828 }
$result
$keys
$key
Definition: croninfo.php:18
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

◆ _parse_message()

GuzzleHttp\Psr7\_parse_message (   $message)

Parses an HTTP message into an associative array.

The array contains the "start-line" key containing the start line of the message, "headers" key containing an associative array of header array values, and a "body" key containing the body of the message.

Parameters
string$messageHTTP request or response to parse.
Returns
array

Definition at line 755 of file functions.php.

References $i, $key, $message, and $result.

Referenced by GuzzleHttp\Psr7\parse_request(), and GuzzleHttp\Psr7\parse_response().

756 {
757  if (!$message) {
758  throw new \InvalidArgumentException('Invalid message');
759  }
760 
761  // Iterate over each line in the message, accounting for line endings
762  $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
763  $result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => ''];
764  array_shift($lines);
765 
766  for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) {
767  $line = $lines[$i];
768  // If two line breaks were encountered, then this is the end of body
769  if (empty($line)) {
770  if ($i < $totalLines - 1) {
771  $result['body'] = implode('', array_slice($lines, $i + 2));
772  }
773  break;
774  }
775  if (strpos($line, ':')) {
776  $parts = explode(':', $line, 2);
777  $key = trim($parts[0]);
778  $value = isset($parts[1]) ? trim($parts[1]) : '';
779  $result['headers'][$key][] = $value;
780  }
781  }
782 
783  return $result;
784 }
$result
catch(Exception $e) $message
$i
Definition: disco.tpl.php:19
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

◆ _parse_request_uri()

GuzzleHttp\Psr7\_parse_request_uri (   $path,
array  $headers 
)

Constructs a URI for an HTTP request message.

Parameters
string$pathPath from the start-line
array$headersArray of headers (each value an array).
Returns
string

Definition at line 795 of file functions.php.

References $path.

Referenced by GuzzleHttp\Psr7\parse_request().

796 {
797  $hostKey = array_filter(array_keys($headers), function ($k) {
798  return strtolower($k) === 'host';
799  });
800 
801  // If no host is found, then a full URI cannot be constructed.
802  if (!$hostKey) {
803  return $path;
804  }
805 
806  $host = $headers[reset($hostKey)][0];
807  $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
808 
809  return $scheme . '://' . $host . '/' . ltrim($path, '/');
810 }
$path
Definition: aliased.php:25
+ Here is the caller graph for this function:

◆ build_query()

GuzzleHttp\Psr7\build_query ( array  $params,
  $encoding = PHP_QUERY_RFC3986 
)

Build a query string from an array of key value pairs.

This function can use the return value of parse_query() to build a query string. This function does not modify the provided keys when an array is encountered (like http_build_query would).

Parameters
array$paramsQuery string parameters.
int | false$encodingSet to false to not encode, PHP_QUERY_RFC3986 to encode using RFC3986, or PHP_QUERY_RFC1738 to encode using RFC1738.
Returns
string

Definition at line 574 of file functions.php.

575 {
576  if (!$params) {
577  return '';
578  }
579 
580  if ($encoding === false) {
581  $encoder = function ($str) { return $str; };
582  } elseif ($encoding === PHP_QUERY_RFC3986) {
583  $encoder = 'rawurlencode';
584  } elseif ($encoding === PHP_QUERY_RFC1738) {
585  $encoder = 'urlencode';
586  } else {
587  throw new \InvalidArgumentException('Invalid type');
588  }
589 
590  $qs = '';
591  foreach ($params as $k => $v) {
592  $k = $encoder($k);
593  if (!is_array($v)) {
594  $qs .= $k;
595  if ($v !== null) {
596  $qs .= '=' . $encoder($v);
597  }
598  $qs .= '&';
599  } else {
600  foreach ($v as $vv) {
601  $qs .= $k;
602  if ($vv !== null) {
603  $qs .= '=' . $encoder($vv);
604  }
605  $qs .= '&';
606  }
607  }
608  }
609 
610  return $qs ? (string) substr($qs, 0, -1) : '';
611 }

◆ copy_to_stream()

GuzzleHttp\Psr7\copy_to_stream ( StreamInterface  $source,
StreamInterface  $dest,
  $maxLen = -1 
)

Copy the contents of a stream into another stream until the given number of bytes have been read.

Parameters
StreamInterface$sourceStream to read from
StreamInterface$destStream to write to
int$maxLenMaximum number of bytes to read. Pass -1 to read the entire stream.
Exceptions

Definition at line 369 of file functions.php.

References $remaining, Psr\Http\Message\StreamInterface\eof(), Psr\Http\Message\StreamInterface\read(), and Psr\Http\Message\StreamInterface\write().

Referenced by GuzzleHttp\Psr7\CachingStream\cacheEntireStream(), and GuzzleHttp\Psr7\UploadedFile\moveTo().

373  {
374  $bufferSize = 8192;
375 
376  if ($maxLen === -1) {
377  while (!$source->eof()) {
378  if (!$dest->write($source->read($bufferSize))) {
379  break;
380  }
381  }
382  } else {
383  $remaining = $maxLen;
384  while ($remaining > 0 && !$source->eof()) {
385  $buf = $source->read(min($bufferSize, $remaining));
386  $len = strlen($buf);
387  if (!$len) {
388  break;
389  }
390  $remaining -= $len;
391  $dest->write($buf);
392  }
393  }
394 }
if($state['core:TerminatedAssocId'] !==null) $remaining
$source
Definition: linkback.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_to_string()

GuzzleHttp\Psr7\copy_to_string ( StreamInterface  $stream,
  $maxLen = -1 
)

Copy the contents of a stream into a string until the given number of bytes have been read.

Parameters
StreamInterface$streamStream to read
int$maxLenMaximum number of bytes to read. Pass -1 to read the entire stream.
Returns
string
Exceptions

Definition at line 328 of file functions.php.

References Psr\Http\Message\StreamInterface\eof(), and Psr\Http\Message\StreamInterface\read().

Referenced by GuzzleHttp\Psr7\PumpStream\__toString(), and GuzzleHttp\Psr7\AppendStream\getContents().

329 {
330  $buffer = '';
331 
332  if ($maxLen === -1) {
333  while (!$stream->eof()) {
334  $buf = $stream->read(1048576);
335  // Using a loose equality here to match on '' and false.
336  if ($buf == null) {
337  break;
338  }
339  $buffer .= $buf;
340  }
341  return $buffer;
342  }
343 
344  $len = 0;
345  while (!$stream->eof() && $len < $maxLen) {
346  $buf = $stream->read($maxLen - $len);
347  // Using a loose equality here to match on '' and false.
348  if ($buf == null) {
349  break;
350  }
351  $buffer .= $buf;
352  $len = strlen($buffer);
353  }
354 
355  return $buffer;
356 }
$stream
PHP stream implementation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBody()

GuzzleHttp\Psr7\getBody ( )

Definition at line 123 of file MessageTrait.php.

References GuzzleHttp\Psr7\$stream, and GuzzleHttp\Psr7\stream_for().

124  {
125  if (!$this->stream) {
126  $this->stream = stream_for('');
127  }
128 
129  return $this->stream;
130  }
$stream
PHP stream implementation.
stream_for($resource='', array $options=[])
Create a new stream based on the input type.
Definition: functions.php:78
+ Here is the call graph for this function:

◆ getHeader()

GuzzleHttp\Psr7\getHeader (   $header)

Definition at line 49 of file MessageTrait.php.

References $header.

Referenced by GuzzleHttp\Psr7\getHeaderLine().

50  {
51  $header = strtolower($header);
52 
53  if (!isset($this->headerNames[$header])) {
54  return [];
55  }
56 
57  $header = $this->headerNames[$header];
58 
59  return $this->headers[$header];
60  }
+ Here is the caller graph for this function:

◆ getHeaderLine()

GuzzleHttp\Psr7\getHeaderLine (   $header)

Definition at line 62 of file MessageTrait.php.

References $header, and GuzzleHttp\Psr7\getHeader().

63  {
64  return implode(', ', $this->getHeader($header));
65  }
getHeader($header)
+ Here is the call graph for this function:

◆ getHeaders()

GuzzleHttp\Psr7\getHeaders ( )

Definition at line 39 of file MessageTrait.php.

40  {
41  return $this->headers;
42  }

◆ getProtocolVersion()

GuzzleHttp\Psr7\getProtocolVersion ( )

Definition at line 23 of file MessageTrait.php.

References GuzzleHttp\Psr7\$protocol.

24  {
25  return $this->protocol;
26  }

◆ hash()

GuzzleHttp\Psr7\hash ( StreamInterface  $stream,
  $algo,
  $rawOutput = false 
)

Calculate a hash of a Stream.

Parameters
StreamInterface$streamStream to calculate the hash for
string$algoHash algorithm (e.g. md5, crc32, etc)
bool$rawOutputWhether or not to use raw output
Returns
string Returns the hash of the stream
Exceptions

Definition at line 406 of file functions.php.

References $algo, $out, Psr\Http\Message\StreamInterface\eof(), Psr\Http\Message\StreamInterface\read(), Psr\Http\Message\StreamInterface\rewind(), Psr\Http\Message\StreamInterface\seek(), and Psr\Http\Message\StreamInterface\tell().

Referenced by League\Flysystem\SafeStorage\__construct(), phpseclib\Crypt\RSA\__construct(), League\Flysystem\SafeStorage\__destruct(), phpseclib\Crypt\RSA\_emsa_pkcs1_v1_5_encode(), phpseclib\Crypt\RSA\_emsa_pss_encode(), phpseclib\Crypt\RSA\_emsa_pss_verify(), TCPDF\_generateencryptionkey(), phpseclib\Crypt\Base\_hashInlineCryptFunction(), TCPDF\_OEvalue(), TCPDF\_Ovalue(), phpseclib\Crypt\RSA\_rsaes_oaep_decrypt(), phpseclib\Crypt\RSA\_rsaes_oaep_encrypt(), TCPDF\_UEvalue(), TCPDF\_Uvalue(), PHPMailer\PHPMailer\PHPMailer\attachAll(), RobRichards\XMLSecLibs\XMLSecurityDSig\calculateDigest(), SimpleSAML\Auth\TimeLimitedToken\calculateTokenValue(), WhiteHat101\Crypt\APR1_MD5\check(), ilMMSubItemGUI\confirmDelete(), ilMMTopItemGUI\confirmDelete(), Twig_Environment\createTemplate(), ZipStream\File\deflateData(), ZipStream\File\deflateFinish(), ZipStream\File\deflateInit(), ilCertificateTemplateDeleteAction\delete(), PHPMailer\PHPMailer\PHPMailer\DKIM_Add(), Twig_Test_IntegrationTestCase\doIntegrationTest(), ilMMTopItemTableGUI\fillRow(), PHPMailer\PHPMailer\PHPMailer\generateId(), Twig_Cache_Filesystem\generateKey(), sspmod_saml_IdP_SAML2\generateNameIdValue(), Monolog\Processor\UidProcessor\generateUid(), sspmod_consent_Auth_Process_Consent\getAttributeHash(), IMSGlobal\LTI\ToolProvider\DataConnector\DataConnector\getConsumerKey(), ilCertificateGUI\getEditorForm(), PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\getHashCode(), sspmod_consent_Auth_Process_Consent\getHashedUserID(), CAS_PGTStorage_File\getPGTIouFilename(), ilMMSubItemTableGUI\getPossibleParentsForFormAndTable(), ilMMSubItemTableGUI\getSelect(), sspmod_consent_Auth_Process_Consent\getTargetedID(), Twig_Parser\getVarName(), Twig_Profiler_NodeVisitor_Profiler\getVarName(), Twig_Compiler\getVarName(), PhpOffice\PhpSpreadsheet\Shared\PasswordHasher\hashPassword(), ilCertificateTemplateImportAction\import(), ilMMSubItemTableGUI\initColumns(), ilMMSubitemFormGUI\initForm(), ilMMTopItemFormGUI\initForm(), phpseclib\Crypt\RSA\loadKey(), PHPMailer\PHPMailer\PHPMailer\msgHTML(), ilBadgeAssignment\prepareJson(), SimpleSAML\Utils\Crypto\pwHash(), Jumbojett\OpenIDConnectClient\requestAuthorization(), League\Flysystem\SafeStorage\retrieveSafely(), ILIAS\BackgroundTasks\Implementation\Persistence\ValueContainer\setHash(), phpseclib\Crypt\RSA\setHash(), Twig_Tests_Cache_FilesystemTest\setUp(), Symfony\Component\Yaml\Tests\ParserTest\testEmptyValue(), APR1_MD5_HashTest\testHash__nullSalt(), APR1_MD5_HashTest\testHash_apache(), APR1_MD5_HashTest\testHash_ChangeMe1(), APR1_MD5_HashTest\testHash_ChangeMe1_blankSalt(), APR1_MD5_HashTest\testHash_ChangeMe1_longSalt(), APR1_MD5_HashTest\testHash_ChangeMe1_nullSalt(), APR1_MD5_HashTest\testHash_null_nullSalt(), APR1_MD5_HashTest\testHash_WhiteHat101(), Symfony\Component\Yaml\Tests\ParserTest\testMappingInASequence(), Symfony\Component\Yaml\Tests\ParserTest\testSequenceInAMapping(), and Jumbojett\OpenIDConnectClient\verifyJWTclaims().

410  {
411  $pos = $stream->tell();
412 
413  if ($pos > 0) {
414  $stream->rewind();
415  }
416 
417  $ctx = hash_init($algo);
418  while (!$stream->eof()) {
419  hash_update($ctx, $stream->read(1048576));
420  }
421 
422  $out = hash_final($ctx, (bool) $rawOutput);
423  $stream->seek($pos);
424 
425  return $out;
426 }
$stream
PHP stream implementation.
$algo
Definition: pwgen.php:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasHeader()

GuzzleHttp\Psr7\hasHeader (   $header)

Definition at line 44 of file MessageTrait.php.

References $header.

45  {
46  return isset($this->headerNames[strtolower($header)]);
47  }

◆ mimetype_from_extension()

GuzzleHttp\Psr7\mimetype_from_extension (   $extension)

Maps a file extensions to a mimetype.

Parameters
$extensionstring The file extension.
Returns
string|null http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types

Definition at line 633 of file functions.php.

References $mimetypes.

Referenced by GuzzleHttp\Psr7\mimetype_from_filename().

634 {
635  static $mimetypes = [
636  '7z' => 'application/x-7z-compressed',
637  'aac' => 'audio/x-aac',
638  'ai' => 'application/postscript',
639  'aif' => 'audio/x-aiff',
640  'asc' => 'text/plain',
641  'asf' => 'video/x-ms-asf',
642  'atom' => 'application/atom+xml',
643  'avi' => 'video/x-msvideo',
644  'bmp' => 'image/bmp',
645  'bz2' => 'application/x-bzip2',
646  'cer' => 'application/pkix-cert',
647  'crl' => 'application/pkix-crl',
648  'crt' => 'application/x-x509-ca-cert',
649  'css' => 'text/css',
650  'csv' => 'text/csv',
651  'cu' => 'application/cu-seeme',
652  'deb' => 'application/x-debian-package',
653  'doc' => 'application/msword',
654  'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
655  'dvi' => 'application/x-dvi',
656  'eot' => 'application/vnd.ms-fontobject',
657  'eps' => 'application/postscript',
658  'epub' => 'application/epub+zip',
659  'etx' => 'text/x-setext',
660  'flac' => 'audio/flac',
661  'flv' => 'video/x-flv',
662  'gif' => 'image/gif',
663  'gz' => 'application/gzip',
664  'htm' => 'text/html',
665  'html' => 'text/html',
666  'ico' => 'image/x-icon',
667  'ics' => 'text/calendar',
668  'ini' => 'text/plain',
669  'iso' => 'application/x-iso9660-image',
670  'jar' => 'application/java-archive',
671  'jpe' => 'image/jpeg',
672  'jpeg' => 'image/jpeg',
673  'jpg' => 'image/jpeg',
674  'js' => 'text/javascript',
675  'json' => 'application/json',
676  'latex' => 'application/x-latex',
677  'log' => 'text/plain',
678  'm4a' => 'audio/mp4',
679  'm4v' => 'video/mp4',
680  'mid' => 'audio/midi',
681  'midi' => 'audio/midi',
682  'mov' => 'video/quicktime',
683  'mp3' => 'audio/mpeg',
684  'mp4' => 'video/mp4',
685  'mp4a' => 'audio/mp4',
686  'mp4v' => 'video/mp4',
687  'mpe' => 'video/mpeg',
688  'mpeg' => 'video/mpeg',
689  'mpg' => 'video/mpeg',
690  'mpg4' => 'video/mp4',
691  'oga' => 'audio/ogg',
692  'ogg' => 'audio/ogg',
693  'ogv' => 'video/ogg',
694  'ogx' => 'application/ogg',
695  'pbm' => 'image/x-portable-bitmap',
696  'pdf' => 'application/pdf',
697  'pgm' => 'image/x-portable-graymap',
698  'png' => 'image/png',
699  'pnm' => 'image/x-portable-anymap',
700  'ppm' => 'image/x-portable-pixmap',
701  'ppt' => 'application/vnd.ms-powerpoint',
702  'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
703  'ps' => 'application/postscript',
704  'qt' => 'video/quicktime',
705  'rar' => 'application/x-rar-compressed',
706  'ras' => 'image/x-cmu-raster',
707  'rss' => 'application/rss+xml',
708  'rtf' => 'application/rtf',
709  'sgm' => 'text/sgml',
710  'sgml' => 'text/sgml',
711  'svg' => 'image/svg+xml',
712  'swf' => 'application/x-shockwave-flash',
713  'tar' => 'application/x-tar',
714  'tif' => 'image/tiff',
715  'tiff' => 'image/tiff',
716  'torrent' => 'application/x-bittorrent',
717  'ttf' => 'application/x-font-ttf',
718  'txt' => 'text/plain',
719  'wav' => 'audio/x-wav',
720  'webm' => 'video/webm',
721  'wma' => 'audio/x-ms-wma',
722  'wmv' => 'video/x-ms-wmv',
723  'woff' => 'application/x-font-woff',
724  'wsdl' => 'application/wsdl+xml',
725  'xbm' => 'image/x-xbitmap',
726  'xls' => 'application/vnd.ms-excel',
727  'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
728  'xml' => 'application/xml',
729  'xpm' => 'image/x-xpixmap',
730  'xwd' => 'image/x-xwindowdump',
731  'yaml' => 'text/yaml',
732  'yml' => 'text/yaml',
733  'zip' => 'application/zip',
734  ];
735 
736  $extension = strtolower($extension);
737 
738  return isset($mimetypes[$extension])
739  ? $mimetypes[$extension]
740  : null;
741 }
$mimetypes
Definition: mimemap.php:5
+ Here is the caller graph for this function:

◆ mimetype_from_filename()

GuzzleHttp\Psr7\mimetype_from_filename (   $filename)

Determines the mimetype of a file by looking at its extension.

Parameters
$filename
Returns
null|string

Definition at line 620 of file functions.php.

References $filename, and GuzzleHttp\Psr7\mimetype_from_extension().

Referenced by GuzzleHttp\Psr7\MultipartStream\createElement().

621 {
622  return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
623 }
mimetype_from_extension($extension)
Maps a file extensions to a mimetype.
Definition: functions.php:633
$filename
Definition: buildRTE.php:89
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modify_request()

GuzzleHttp\Psr7\modify_request ( RequestInterface  $request,
array  $changes 
)

Clone and modify a request with the given changes.

The changes can be one of:

  • method: (string) Changes the HTTP method.
  • set_headers: (array) Sets the given headers.
  • remove_headers: (array) Remove the given headers.
  • body: (mixed) Sets the given body.
  • uri: (UriInterface) Set the URI.
  • query: (string) Set the query string value of the URI.
  • version: (string) Set the protocol version.
Parameters
RequestInterface$requestRequest to clone and modify.
array$changesChanges to apply.
Returns
RequestInterface

Definition at line 201 of file functions.php.

References $request, GuzzleHttp\Psr7\_caseless_remove(), Psr\Http\Message\MessageInterface\getBody(), Psr\Http\Message\MessageInterface\getHeaders(), Psr\Http\Message\RequestInterface\getMethod(), Psr\Http\Message\MessageInterface\getProtocolVersion(), and Psr\Http\Message\RequestInterface\getUri().

202 {
203  if (!$changes) {
204  return $request;
205  }
206 
207  $headers = $request->getHeaders();
208 
209  if (!isset($changes['uri'])) {
210  $uri = $request->getUri();
211  } else {
212  // Remove the host header if one is on the URI
213  if ($host = $changes['uri']->getHost()) {
214  $changes['set_headers']['Host'] = $host;
215 
216  if ($port = $changes['uri']->getPort()) {
217  $standardPorts = ['http' => 80, 'https' => 443];
218  $scheme = $changes['uri']->getScheme();
219  if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
220  $changes['set_headers']['Host'] .= ':'.$port;
221  }
222  }
223  }
224  $uri = $changes['uri'];
225  }
226 
227  if (!empty($changes['remove_headers'])) {
228  $headers = _caseless_remove($changes['remove_headers'], $headers);
229  }
230 
231  if (!empty($changes['set_headers'])) {
232  $headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
233  $headers = $changes['set_headers'] + $headers;
234  }
235 
236  if (isset($changes['query'])) {
237  $uri = $uri->withQuery($changes['query']);
238  }
239 
240  if ($request instanceof ServerRequestInterface) {
241  return new ServerRequest(
242  isset($changes['method']) ? $changes['method'] : $request->getMethod(),
243  $uri,
244  $headers,
245  isset($changes['body']) ? $changes['body'] : $request->getBody(),
246  isset($changes['version'])
247  ? $changes['version']
248  : $request->getProtocolVersion(),
249  $request->getServerParams()
250  );
251  }
252 
253  return new Request(
254  isset($changes['method']) ? $changes['method'] : $request->getMethod(),
255  $uri,
256  $headers,
257  isset($changes['body']) ? $changes['body'] : $request->getBody(),
258  isset($changes['version'])
259  ? $changes['version']
260  : $request->getProtocolVersion()
261  );
262 }
foreach($paths as $path) $request
Definition: asyncclient.php:32
_caseless_remove($keys, array $data)
Definition: functions.php:813
+ Here is the call graph for this function:

◆ normalize_header()

GuzzleHttp\Psr7\normalize_header (   $header)

Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values.

Parameters
string | array$headerHeader to normalize.
Returns
array Returns the normalized header field values.

Definition at line 162 of file functions.php.

References $header, and $result.

Referenced by GuzzleHttp\Psr7\parse_header().

163 {
164  if (!is_array($header)) {
165  return array_map('trim', explode(',', $header));
166  }
167 
168  $result = [];
169  foreach ($header as $value) {
170  foreach ((array) $value as $v) {
171  if (strpos($v, ',') === false) {
172  $result[] = $v;
173  continue;
174  }
175  foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
176  $result[] = trim($vv);
177  }
178  }
179  }
180 
181  return $result;
182 }
$result
+ Here is the caller graph for this function:

◆ parse_header()

GuzzleHttp\Psr7\parse_header (   $header)

Parse an array of header values containing ";" separated data into an array of associative arrays representing the header key value pair data of the header.

When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value.

Parameters
string | array$headerHeader to parse into components.
Returns
array Returns the parsed header values.

Definition at line 129 of file functions.php.

References $header, $m, PHPMailer\PHPMailer\$params, and GuzzleHttp\Psr7\normalize_header().

130 {
131  static $trimmed = "\"' \n\t\r";
132  $params = $matches = [];
133 
134  foreach (normalize_header($header) as $val) {
135  $part = [];
136  foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
137  if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
138  $m = $matches[0];
139  if (isset($m[1])) {
140  $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
141  } else {
142  $part[] = trim($m[0], $trimmed);
143  }
144  }
145  }
146  if ($part) {
147  $params[] = $part;
148  }
149  }
150 
151  return $params;
152 }
normalize_header($header)
Converts an array of header values that may contain comma separated headers into an array of headers ...
Definition: functions.php:162
+ Here is the call graph for this function:

◆ parse_query()

GuzzleHttp\Psr7\parse_query (   $str,
  $urlEncoding = true 
)

Parse a query string into an associative array.

If multiple values are found for the same key, the value of that key value pair will become an array. This function does not parse nested PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).

Parameters
string$strQuery string to parse
bool | string$urlEncodingHow the query string is encoded
Returns
array

Definition at line 524 of file functions.php.

References $key, and $result.

525 {
526  $result = [];
527 
528  if ($str === '') {
529  return $result;
530  }
531 
532  if ($urlEncoding === true) {
533  $decoder = function ($value) {
534  return rawurldecode(str_replace('+', ' ', $value));
535  };
536  } elseif ($urlEncoding == PHP_QUERY_RFC3986) {
537  $decoder = 'rawurldecode';
538  } elseif ($urlEncoding == PHP_QUERY_RFC1738) {
539  $decoder = 'urldecode';
540  } else {
541  $decoder = function ($str) { return $str; };
542  }
543 
544  foreach (explode('&', $str) as $kvp) {
545  $parts = explode('=', $kvp, 2);
546  $key = $decoder($parts[0]);
547  $value = isset($parts[1]) ? $decoder($parts[1]) : null;
548  if (!isset($result[$key])) {
549  $result[$key] = $value;
550  } else {
551  if (!is_array($result[$key])) {
552  $result[$key] = [$result[$key]];
553  }
554  $result[$key][] = $value;
555  }
556  }
557 
558  return $result;
559 }
$result
$key
Definition: croninfo.php:18

◆ parse_request()

GuzzleHttp\Psr7\parse_request (   $message)

Parses a request message string into a request object.

Parameters
string$messageRequest message string.
Returns
Request

Definition at line 463 of file functions.php.

References $data, $message, $request, $version, GuzzleHttp\Psr7\_parse_message(), and GuzzleHttp\Psr7\_parse_request_uri().

Referenced by soap_server\service(), and nusoap_server\service().

464 {
466  $matches = [];
467  if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
468  throw new \InvalidArgumentException('Invalid request string');
469  }
470  $parts = explode(' ', $data['start-line'], 3);
471  $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
472 
473  $request = new Request(
474  $parts[0],
475  $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
476  $data['headers'],
477  $data['body'],
478  $version
479  );
480 
481  return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
482 }
foreach($paths as $path) $request
Definition: asyncclient.php:32
$version
Definition: build.php:27
catch(Exception $e) $message
_parse_request_uri($path, array $headers)
Constructs a URI for an HTTP request message.
Definition: functions.php:795
_parse_message($message)
Parses an HTTP message into an associative array.
Definition: functions.php:755
$data
Definition: bench.php:6
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_response()

GuzzleHttp\Psr7\parse_response (   $message)

Parses a response message string into a response object.

Parameters
string$messageResponse message string.
Returns
Response

Definition at line 491 of file functions.php.

References $data, $message, and GuzzleHttp\Psr7\_parse_message().

492 {
494  // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
495  // between status-code and reason-phrase is required. But browsers accept
496  // responses without space and reason as well.
497  if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
498  throw new \InvalidArgumentException('Invalid response string');
499  }
500  $parts = explode(' ', $data['start-line'], 3);
501 
502  return new Response(
503  $parts[1],
504  $data['headers'],
505  $data['body'],
506  explode('/', $parts[0])[1],
507  isset($parts[2]) ? $parts[2] : null
508  );
509 }
catch(Exception $e) $message
_parse_message($message)
Parses an HTTP message into an associative array.
Definition: functions.php:755
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ readline()

GuzzleHttp\Psr7\readline ( StreamInterface  $stream,
  $maxLength = null 
)

Read a line from the stream up to the maximum allowed buffer length.

Parameters
StreamInterface$streamStream to read from
int$maxLengthMaximum buffer length
Returns
string|bool

Definition at line 436 of file functions.php.

References $size, Psr\Http\Message\StreamInterface\eof(), and Psr\Http\Message\StreamInterface\read().

437 {
438  $buffer = '';
439  $size = 0;
440 
441  while (!$stream->eof()) {
442  // Using a loose equality here to match on '' and false.
443  if (null == ($byte = $stream->read(1))) {
444  return $buffer;
445  }
446  $buffer .= $byte;
447  // Break when a new line is found or the max length - 1 is reached
448  if ($byte === "\n" || ++$size === $maxLength - 1) {
449  break;
450  }
451  }
452 
453  return $buffer;
454 }
$size
Definition: RandomTest.php:84
$stream
PHP stream implementation.
+ Here is the call graph for this function:

◆ rewind_body()

GuzzleHttp\Psr7\rewind_body ( MessageInterface  $message)

Attempts to rewind a message body and throws an exception on failure.

The body of the message will only be rewound if a call to tell() returns a value other than 0.

Parameters
MessageInterface$messageMessage to rewind
Exceptions

Definition at line 274 of file functions.php.

References $filename, and Psr\Http\Message\MessageInterface\getBody().

275 {
276  $body = $message->getBody();
277 
278  if ($body->tell()) {
279  $body->rewind();
280  }
281 }
catch(Exception $e) $message
+ Here is the call graph for this function:

◆ setHeaders()

GuzzleHttp\Psr7\setHeaders ( array  $headers)
private

Definition at line 143 of file MessageTrait.php.

References $header, and GuzzleHttp\Psr7\trimHeaderValues().

Referenced by GuzzleHttp\Psr7\Request\__construct(), and GuzzleHttp\Psr7\Response\__construct().

144  {
145  $this->headerNames = $this->headers = [];
146  foreach ($headers as $header => $value) {
147  if (!is_array($value)) {
148  $value = [$value];
149  }
150 
151  $value = $this->trimHeaderValues($value);
152  $normalized = strtolower($header);
153  if (isset($this->headerNames[$normalized])) {
154  $header = $this->headerNames[$normalized];
155  $this->headers[$header] = array_merge($this->headers[$header], $value);
156  } else {
157  $this->headerNames[$normalized] = $header;
158  $this->headers[$header] = $value;
159  }
160  }
161  }
trimHeaderValues(array $values)
Trims whitespace from the header values.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ str()

GuzzleHttp\Psr7\str ( MessageInterface  $message)

Returns the string representation of an HTTP message.

Parameters
MessageInterface$messageMessage to convert to a string.
Returns
string

Definition at line 18 of file functions.php.

References $name, $values, Psr\Http\Message\MessageInterface\getBody(), Psr\Http\Message\MessageInterface\getHeaders(), Psr\Http\Message\MessageInterface\getProtocolVersion(), and Psr\Http\Message\MessageInterface\hasHeader().

Referenced by Gettext\Utils\StringReader\__construct(), and Gettext\Utils\StringReader\read().

19 {
20  if ($message instanceof RequestInterface) {
21  $msg = trim($message->getMethod() . ' '
22  . $message->getRequestTarget())
23  . ' HTTP/' . $message->getProtocolVersion();
24  if (!$message->hasHeader('host')) {
25  $msg .= "\r\nHost: " . $message->getUri()->getHost();
26  }
27  } elseif ($message instanceof ResponseInterface) {
28  $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29  . $message->getStatusCode() . ' '
30  . $message->getReasonPhrase();
31  } else {
32  throw new \InvalidArgumentException('Unknown message type');
33  }
34 
35  foreach ($message->getHeaders() as $name => $values) {
36  $msg .= "\r\n{$name}: " . implode(', ', $values);
37  }
38 
39  return "{$msg}\r\n\r\n" . $message->getBody();
40 }
catch(Exception $e) $message
$values
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stream_for()

GuzzleHttp\Psr7\stream_for (   $resource = '',
array  $options = [] 
)

Create a new stream based on the input type.

Options is an associative array that can contain the following keys:

  • metadata: Array of custom metadata.
  • size: Size of the stream.
Parameters
resource | string | null | int | float | bool | StreamInterface | callable$resourceEntity body data
array$optionsAdditional options
Returns
Stream
Exceptions

Definition at line 78 of file functions.php.

References PHPMailer\PHPMailer\$options, $result, and GuzzleHttp\Psr7\$stream.

Referenced by GuzzleHttp\Psr7\Request\__construct(), GuzzleHttp\Psr7\Response\__construct(), GuzzleHttp\Psr7\MultipartStream\addElement(), GuzzleHttp\Psr7\LazyOpenStream\createStream(), GuzzleHttp\Psr7\MultipartStream\createStream(), and GuzzleHttp\Psr7\getBody().

79 {
80  if (is_scalar($resource)) {
81  $stream = fopen('php://temp', 'r+');
82  if ($resource !== '') {
83  fwrite($stream, $resource);
84  fseek($stream, 0);
85  }
86  return new Stream($stream, $options);
87  }
88 
89  switch (gettype($resource)) {
90  case 'resource':
91  return new Stream($resource, $options);
92  case 'object':
93  if ($resource instanceof StreamInterface) {
94  return $resource;
95  } elseif ($resource instanceof \Iterator) {
96  return new PumpStream(function () use ($resource) {
97  if (!$resource->valid()) {
98  return false;
99  }
100  $result = $resource->current();
101  $resource->next();
102  return $result;
103  }, $options);
104  } elseif (method_exists($resource, '__toString')) {
105  return stream_for((string) $resource, $options);
106  }
107  break;
108  case 'NULL':
109  return new Stream(fopen('php://temp', 'r+'), $options);
110  }
111 
112  if (is_callable($resource)) {
113  return new PumpStream($resource, $options);
114  }
115 
116  throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
117 }
$result
$stream
PHP stream implementation.
stream_for($resource='', array $options=[])
Create a new stream based on the input type.
Definition: functions.php:78
+ Here is the caller graph for this function:

◆ trimHeaderValues()

GuzzleHttp\Psr7\trimHeaderValues ( array  $values)
private

Trims whitespace from the header values.

Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.

header-field = field-name ":" OWS field-value OWS OWS = *( SP / HTAB )

Parameters
string[]$values Header values
Returns
string[] Trimmed header values
See also
https://tools.ietf.org/html/rfc7230#section-3.2.4

Definition at line 177 of file MessageTrait.php.

References $values.

Referenced by GuzzleHttp\Psr7\setHeaders(), GuzzleHttp\Psr7\withAddedHeader(), and GuzzleHttp\Psr7\withHeader().

178  {
179  return array_map(function ($value) {
180  return trim($value, " \t");
181  }, $values);
182  }
$values
+ Here is the caller graph for this function:

◆ uri_for()

GuzzleHttp\Psr7\uri_for (   $uri)

Returns a UriInterface for the given value.

This function accepts a string or {

See also
Psr} and returns a UriInterface for the given value. If the value is already a UriInterface, it is returned as-is.
Parameters
string | UriInterface$uri
Returns
UriInterface
Exceptions

Definition at line 54 of file functions.php.

55 {
56  if ($uri instanceof UriInterface) {
57  return $uri;
58  } elseif (is_string($uri)) {
59  return new Uri($uri);
60  }
61 
62  throw new \InvalidArgumentException('URI must be a string or UriInterface');
63 }

◆ withAddedHeader()

GuzzleHttp\Psr7\withAddedHeader (   $header,
  $value 
)

Definition at line 86 of file MessageTrait.php.

References $header, and GuzzleHttp\Psr7\trimHeaderValues().

87  {
88  if (!is_array($value)) {
89  $value = [$value];
90  }
91 
92  $value = $this->trimHeaderValues($value);
93  $normalized = strtolower($header);
94 
95  $new = clone $this;
96  if (isset($new->headerNames[$normalized])) {
97  $header = $this->headerNames[$normalized];
98  $new->headers[$header] = array_merge($this->headers[$header], $value);
99  } else {
100  $new->headerNames[$normalized] = $header;
101  $new->headers[$header] = $value;
102  }
103 
104  return $new;
105  }
trimHeaderValues(array $values)
Trims whitespace from the header values.
+ Here is the call graph for this function:

◆ withBody()

GuzzleHttp\Psr7\withBody ( StreamInterface  $body)

Definition at line 132 of file MessageTrait.php.

133  {
134  if ($body === $this->stream) {
135  return $this;
136  }
137 
138  $new = clone $this;
139  $new->stream = $body;
140  return $new;
141  }

◆ withHeader()

GuzzleHttp\Psr7\withHeader (   $header,
  $value 
)

Definition at line 67 of file MessageTrait.php.

References $header, and GuzzleHttp\Psr7\trimHeaderValues().

68  {
69  if (!is_array($value)) {
70  $value = [$value];
71  }
72 
73  $value = $this->trimHeaderValues($value);
74  $normalized = strtolower($header);
75 
76  $new = clone $this;
77  if (isset($new->headerNames[$normalized])) {
78  unset($new->headers[$new->headerNames[$normalized]]);
79  }
80  $new->headerNames[$normalized] = $header;
81  $new->headers[$header] = $value;
82 
83  return $new;
84  }
trimHeaderValues(array $values)
Trims whitespace from the header values.
+ Here is the call graph for this function:

◆ withoutHeader()

GuzzleHttp\Psr7\withoutHeader (   $header)

Definition at line 107 of file MessageTrait.php.

References $header.

108  {
109  $normalized = strtolower($header);
110 
111  if (!isset($this->headerNames[$normalized])) {
112  return $this;
113  }
114 
115  $header = $this->headerNames[$normalized];
116 
117  $new = clone $this;
118  unset($new->headers[$header], $new->headerNames[$normalized]);
119 
120  return $new;
121  }

◆ withProtocolVersion()

GuzzleHttp\Psr7\withProtocolVersion (   $version)

Definition at line 28 of file MessageTrait.php.

References $version.

29  {
30  if ($this->protocol === $version) {
31  return $this;
32  }
33 
34  $new = clone $this;
35  $new->protocol = $version;
36  return $new;
37  }
$version
Definition: build.php:27

Variable Documentation

◆ $headerNames

GuzzleHttp::Psr7\$headerNames = []
private

Definition at line 15 of file MessageTrait.php.

Referenced by ilObjSessionGUI\eventsListObject().

◆ $protocol

◆ $stream

GuzzleHttp::Psr7::$stream
private

PHP stream implementation.

Definition at line 21 of file MessageTrait.php.

Referenced by GuzzleHttp\Psr7\DroppingStream\__construct(), ZipStream\Stream\__construct(), GuzzleHttp\Psr7\AppendStream\__construct(), GuzzleHttp\Psr7\CachingStream\__construct(), GuzzleHttp\Psr7\LimitStream\__construct(), AMFReader\__construct(), ilFileSystemAbstractionStorage\_copyDirectory(), TCPDF\_putannotsobjs(), TCPDF\_putAPXObject(), TCPDF\_putEmbeddedFiles(), TCPDF\_putfonts(), TCPDF\_putimages(), TCPDF\_putshaders(), TCPDF\_puttruetypeunicode(), TCPDF\_putxobjects(), ZipStream\ZipStream\addFileFromStream(), ZipStreamTest\ZipStreamTest\addLargeFileFileFromPath(), Sabre\Event\Loop\addReadStream(), Sabre\Event\Loop\Loop\addReadStream(), GuzzleHttp\Psr7\AppendStream\addStream(), Sabre\Event\Loop\addWriteStream(), Sabre\Event\Loop\Loop\addWriteStream(), ilPropertyFormGUI\checkInput(), GuzzleHttp\Psr7\AppendStream\close(), Sabre\DAV\Tree\copyNode(), Twig_Tests_LexerTest\countToken(), GuzzleHttp\Psr7\MultipartStream\createElement(), Sabre\VObject\Splitter\VCardTest\createStream(), Sabre\VObject\Splitter\ICalendarTest\createStream(), GuzzleHttp\Psr7\MultipartStream\createStream(), TCPDF_PARSER\decodeStream(), GuzzleHttp\Psr7\FnStream\decorate(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\deliver(), ilFileDataMail\deliverAttachmentsAsZip(), ZipStream\Stream\detach(), TestParser\filterBodyNodes(), Gettext\Extractors\Mo\fromString(), ILIAS\Filesystem\Util\PHPStreamFunctions\fseek(), GuzzleHttp\Psr7\getBody(), Sabre\HTTP\Message\getBodyAsStream(), getid3_matroska\getDefaultStreamInfo(), ilObjBibliographic\getLegacyAbsolutePath(), ilFileSystemAbstractionStorage\getLegacyFullAbsolutePath(), GuzzleHttp\Psr7\AppendStream\getSize(), PhpOffice\PhpSpreadsheet\Shared\OLERead\getStream(), Twig_ExpressionParser\getTest(), Twig_ExpressionParser\getTestNodeClass(), ZipStreamTest\ZipStreamTest\getTmpFileStream(), ilWebAccessCheckerDelivery\handleAccessErrors(), Sabre\DAV\CorePlugin\httpGet(), ILIAS\Filesystem\Stream\Streams\ofString(), Twig_Extensions_TokenParser_Trans\parse(), Twig_TokenParser_Embed\parse(), Twig_TokenParser_With\parse(), Twig_TokenParser_From\parse(), Twig_TokenParser_Extends\parse(), Twig_TokenParser_Macro\parse(), Twig_TokenParser_Sandbox\parse(), Twig_TokenParser_Block\parse(), Twig_TokenParser_For\parse(), Twig_TokenParser_If\parse(), Twig_TokenParser_Use\parse(), Twig_Extensions_Grammar_Body\parse(), Twig_TokenParser_Set\parse(), Twig_TokenParser_AutoEscape\parse(), Twig_TokenParser_Include\parseArguments(), Twig_ExpressionParser\parseArguments(), Twig_ExpressionParser\parseArrayExpression(), Twig_ExpressionParser\parseAssignmentExpression(), Twig_ExpressionParser\parseHashExpression(), Twig_ExpressionParser\parseStringExpression(), Twig_ExpressionParser\parseSubscriptExpression(), Twig_ExpressionParser\parseTestExpression(), ilStudyProgrammeType\processAndStoreIconFile(), ZipStream\File\processPath(), Sabre\DAV\Mock\StreamingFile\put(), ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator\putStream(), ilUtil\rCopy(), ILIAS\Filesystem\Provider\FlySystem\FlySystemFileStreamAccess\readStream(), League\Flysystem\Adapter\Local\readStream(), League\Flysystem\Adapter\Ftp\readStream(), ilCtrl\redirectToURL(), ILIAS\FileUpload\FileUploadImpl\register(), Sabre\Event\Loop\removeReadStream(), Sabre\Event\Loop\Loop\removeReadStream(), Sabre\Event\Loop\removeWriteStream(), Sabre\Event\Loop\Loop\removeWriteStream(), GuzzleHttp\Psr7\AppendStream\seek(), CAS_Client\serviceMail(), Sabre\VObject\Parser\MimeDir\setInput(), Sabre\DAV\ServerRangeTest\setUp(), ilTemplate\show(), GuzzleHttp\Psr7\stream_for(), ZipStreamTest\ZipStreamTest\testAddFile(), ZipStreamTest\ZipStreamTest\testAddFileFromPath(), ZipStreamTest\ZipStreamTest\testAddFileFromPathWithStorageMethod(), ZipStreamTest\ZipStreamTest\testAddFileFromPsr7Stream(), ZipStreamTest\ZipStreamTest\testAddFileFromPsr7StreamWithFileSizeSet(), ZipStreamTest\ZipStreamTest\testAddFileFromStream(), ZipStreamTest\ZipStreamTest\testAddFileFromStreamWithStorageMethod(), ZipStreamTest\ZipStreamTest\testAddFileNonUtf8NameUtfComment(), ZipStreamTest\ZipStreamTest\testAddFileUtf8NameComment(), ZipStreamTest\ZipStreamTest\testAddFileUtf8NameNonUtfComment(), ZipStreamTest\ZipStreamTest\testAddFileWithStorageMethod(), Twig_Tests_ExpressionParserTest\testArrayExpression(), Twig_Tests_LexerTest\testBigNumbers(), ZipStreamTest\ZipStreamTest\testCreateArchiveWithFlushOptionSet(), ZipStreamTest\ZipStreamTest\testCreateArchiveWithOutputBufferingOffAndFlushOptionSet(), ZipStreamTest\ZipStreamTest\testDecompressFileWithMacUnarchiver(), Twig_Tests_TokenStreamTest\testEndOfTemplateLook(), Twig_Tests_TokenStreamTest\testEndOfTemplateNext(), Sabre\Xml\ServiceTest\testExpectStream(), Twig_Tests_NodeVisitor_OptimizerTest\testForOptimizer(), Twig_Tests_LexerTest\testLegacyConstructorSignature(), Twig_Tests_TokenStreamTest\testLegacyConstructorSignature(), Twig_Tests_EnvironmentTest\testLegacyTokenizeSignature(), Twig_Tests_LexerTest\testLineDirective(), Twig_Tests_LexerTest\testLineDirectiveInline(), Twig_Tests_LexerTest\testNameLabelForFunction(), Twig_Tests_LexerTest\testNameLabelForTag(), Twig_Tests_TokenStreamTest\testNext(), ILIAS\FileUpload\Processor\VirusScannerPreProcessorTest\testNoVirusDetected(), Twig_Tests_LexerTest\testOperatorEndingWithALetterAtTheEndOfALine(), Sabre\Xml\ServiceTest\testParseStream(), Sabre\VObject\Parser\JsonTest\testParseStreamArg(), ILIAS\FileUpload\Processor\PreProcessorManagerImplTest\testProcessInvalidFileWhichShouldGetRejected(), ILIAS\FileUpload\Processor\PreProcessorManagerImplTest\testProcessValidFileWhichShouldSucceed(), ILIAS\FileUpload\Processor\PreProcessorManagerImplTest\testProcessValidFileWithFailingProcessorWhichShouldGetRejected(), ILIAS\FileUpload\Processor\BlacklistExtensionPreProcessorTest\testProcessWhichShouldSucceed(), ILIAS\FileUpload\Processor\FilenameOverridePreProcessorTest\testProcessWhichShouldSucceed(), ILIAS\FileUpload\Processor\WhitelistExtensionPreProcessorTest\testProcessWhichShouldSucceed(), ILIAS\FileUpload\Processor\WhitelistFileHeaderPreProcessorTest\testProcessWhichShouldSucceed(), ILIAS\FileUpload\Processor\BlacklistFileHeaderPreProcessorTest\testProcessWhichShouldSucceed(), ILIAS\FileUpload\Processor\BlacklistExtensionPreProcessorTest\testProcessWithBlacklistedEmptyExtensionWhichShouldGetRejected(), ILIAS\FileUpload\Processor\BlacklistExtensionPreProcessorTest\testProcessWithBlacklistedExtensionWhichShouldGetRejected(), ILIAS\FileUpload\Processor\WhitelistFileHeaderPreProcessorTest\testProcessWithHeaderMismatchWhichShouldGetRejected(), ILIAS\FileUpload\Processor\BlacklistFileHeaderPreProcessorTest\testProcessWithHeaderMismatchWhichShouldGetRejected(), ILIAS\FileUpload\Processor\WhitelistExtensionPreProcessorTest\testProcessWithoutExtensionWhichShouldSucceed(), ILIAS\FileUpload\Processor\PreProcessorManagerImplTest\testProcessWithoutProcessorsWhichShouldSucceed(), ILIAS\FileUpload\Processor\WhitelistExtensionPreProcessorTest\testProcessWithoutWhitelistedExtensionWhichShouldGetRejected(), Sabre\CalDAV\CalendarObjectTest\testPutStream(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testPutStreamWhichShouldSucceed(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testPutStreamWithDetachedStreamWhichShouldFail(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testPutStreamWithGeneralFailureWhichShouldFail(), Sabre\DAV\FSExt\FileTest\testRangeStream(), Sabre\VObject\ReaderTest\testReadStream(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testReadStreamWhichShouldSucceed(), Sabre\VObject\ReaderTest\testReadXMLStream(), Twig_Tests_NodeVisitor_OptimizerTest\testRenderBlockOptimizer(), Twig_Tests_NodeVisitor_OptimizerTest\testRenderParentBlockOptimizer(), Twig_Tests_NodeVisitor_OptimizerTest\testRenderVariableBlockOptimizer(), Twig_Tests_ExpressionParserTest\testStringExpression(), Twig_Tests_ExpressionParserTest\testStringExpressionDoesNotConcatenateTwoConsecutiveStrings(), Twig_Tests_LexerTest\testStringWithEscapedDelimiter(), Twig_Tests_LexerTest\testStringWithEscapedInterpolation(), Twig_Tests_LexerTest\testStringWithHash(), Twig_Tests_LexerTest\testStringWithInterpolation(), Twig_Tests_LexerTest\testStringWithNestedInterpolations(), Twig_Tests_LexerTest\testStringWithNestedInterpolationsInBlock(), Twig_Tests_ParserTest\testUnknownTag(), Twig_Tests_ParserTest\testUnknownTagWithoutSuggestions(), Twig_Tests_ExpressionParserTest\testUnknownTest(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testUpdateStreamWhichShouldSucceed(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testUpdateStreamWithDetachedStreamWhichShouldFail(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testUpdateStreamWithGeneralFailureWhichShouldFail(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testUpdateStreamWithMissingFileWhichShouldFail(), ILIAS\FileUpload\Processor\VirusScannerPreProcessorTest\testVirusDetected(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testWriteStreamWhichShouldSucceed(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testWriteStreamWithDetachedStreamWhichShouldFail(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testWriteStreamWithExistingFileWhichShouldFail(), Filesystem\Provider\FlySystem\FlySystemFileStreamAccessTest\testWriteStreamWithFailingAdapterWhichShouldFail(), ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator\updateStream(), ilLoggingErrorFileStorage\write(), League\Flysystem\Adapter\Ftp\write(), League\Flysystem\Adapter\Local\writeStream(), and ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator\writeStream().

◆ MessageTrait

trait GuzzleHttp::Psr7\MessageTrait
Initial value:
{
private $headers = []

Trait implementing functionality common to requests and responses.

Definition at line 10 of file MessageTrait.php.