Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 131 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

KeyValueHttpHeader:: (9 methods):
  __construct()
  has()
  get()
  isEmpty()
  current()
  next()
  key()
  valid()
  rewind()


Class: KeyValueHttpHeader  - X-Ref

__construct(array $values)   X-Ref

param: array $values

has($key)   X-Ref

param: string $key
return: bool

get($key, $default = '')   X-Ref

param: string $key
param: string $default the value to return if don't exist
return: string

isEmpty()   X-Ref

return: bool

current()   X-Ref
Return the current element

return: mixed Can return any type.

next()   X-Ref
Move forward to next element

return: void Any returned value is ignored.

key()   X-Ref
Return the key of the current element

return: mixed scalar on success, or null on failure.

valid()   X-Ref
Checks if current position is valid

return: boolean The return value will be casted to boolean and then evaluated.

rewind()   X-Ref
Rewind the Iterator to the first element

return: void Any returned value is ignored.