hls-test/HLS/OwningStreamReader.php
2023-04-04 09:57:12 -07:00

21 lines
351 B
PHP

<?php
/**
* Base class for streaming media segment readers
*
* @file
* @ingroup HLS
*/
namespace MediaWiki\TimedMediaHandler\HLS;
/**
* Base file class that fcloses on destruct.
*/
class OwningStreamReader extends StreamReader {
public function __destruct() {
if ( $this->file ) {
fclose( $this->file );
$this->file = null;
}
}
}