WordPress at a glance
class is not described

POMO_CachedFileReader{} WP 1.0

Reads the contents of the file in the beginning.

No Hooks.

Return

````. Null. Nothing.

Usage

$POMO_CachedFileReader = new POMO_CachedFileReader();
// use class methods

Methods

  1. POMO_CachedFileReader( $filename )
  2. __construct( $filename )

Code of POMO_CachedFileReader{} WP 5.7

<?php
class POMO_CachedFileReader extends POMO_StringReader {
	/**
	 * PHP5 constructor.
	 */
	function __construct( $filename ) {
		parent::__construct();
		$this->_str = file_get_contents( $filename );
		if ( false === $this->_str ) {
			return false;
		}
		$this->_pos = 0;
	}

	/**
	 * PHP4 constructor.
	 *
	 * @deprecated 5.4.0 Use __construct() instead.
	 *
	 * @see POMO_CachedFileReader::__construct()
	 */
	public function POMO_CachedFileReader( $filename ) {
		_deprecated_constructor( self::class, '5.4.0', static::class );
		self::__construct( $filename );
	}
}