Title: POMO_CachedFileReader::__construct
Published: August 18, 2015
Last modified: May 20, 2026

---

# POMO_CachedFileReader::__construct( $filename )

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/POMO_CachedFileReader/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/POMO_CachedFileReader/__construct/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/POMO_CachedFileReader/__construct/?output_format=md#wp--skip-link--target)

PHP5 constructor.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/POMO_CachedFileReader/__construct/?output_format=md#source)󠁿

    ```php
    public function __construct( $filename ) {
    	parent::__construct();
    	$this->_str = file_get_contents( $filename );
    	if ( false === $this->_str ) {
    		return false;
    	}
    	$this->_pos = 0;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pomo/streams.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/pomo/streams.php#L313)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/pomo/streams.php#L313-L320)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/POMO_CachedFileReader/__construct/?output_format=md#related)󠁿

| Uses | Description | 
| [POMO_StringReader::__construct()](https://developer.wordpress.org/reference/classes/pomo_stringreader/__construct/)`wp-includes/pomo/streams.php` |

PHP5 constructor.

  |

| Used by | Description | 
| [POMO_CachedIntFileReader::__construct()](https://developer.wordpress.org/reference/classes/pomo_cachedintfilereader/__construct/)`wp-includes/pomo/streams.php` |

PHP5 constructor.

  | 
| [POMO_CachedFileReader::POMO_CachedFileReader()](https://developer.wordpress.org/reference/classes/pomo_cachedfilereader/pomo_cachedfilereader/)`wp-includes/pomo/streams.php` |

PHP4 constructor.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fpomo_cachedfilereader%2F__construct%2F)
before being able to contribute a note or feedback.