hls-test/HLS/OwningStreamReader.php

22 lines
351 B
PHP
Raw Permalink Normal View History

2023-04-04 16:57:12 +00:00
<?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;
}
}
}