class POMO_CachedFileReader {}

In this article

Reads the contents of the file in the beginning.

Methods

NameDescription
POMO_CachedFileReader::__constructPHP5 constructor.
POMO_CachedFileReader::POMO_CachedFileReaderPHP4 constructor. — deprecated

Source

class POMO_CachedFileReader extends POMO_StringReader {
	/**
	 * PHP5 constructor.
	 */
	public 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 );
	}
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.