22 lines
351 B
PHP
22 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;
|
||
|
}
|
||
|
}
|
||
|
}
|