*/
public function __construct( $path, array $params = [] ) {
$this->path = $path;
- $this->obResetFunc = isset( $params['obResetFunc'] )
- ? $params['obResetFunc']
- : [ __CLASS__, 'resetOutputBuffers' ];
- $this->streamMimeFunc = isset( $params['streamMimeFunc'] )
- ? $params['streamMimeFunc']
- : [ __CLASS__, 'contentTypeFromPath' ];
+ $this->obResetFunc = $params['obResetFunc'] ?? [ __CLASS__, 'resetOutputBuffers' ];
+ $this->streamMimeFunc = $params['streamMimeFunc'] ?? [ __CLASS__, 'contentTypeFromPath' ];
}
/**
* @param bool $sendErrors Send error messages if errors occur (like 404)
* @param array $optHeaders HTTP request header map (e.g. "range") (use lowercase keys)
* @param int $flags Bitfield of STREAM_* constants
- * @throws MWException
* @return bool Success
*/
public function stream(