Stream wrapper to convert markup of mostly-PHP templates into PHP prior to include().
More...
|
| stream_open ($path, $mode, $options, &$opened_path) |
| Opens the script file and converts markup.
|
|
| url_stat () |
| Included so that __FILE__ returns the appropriate info.
|
|
| stream_read ($count) |
| Reads from the stream.
|
|
| stream_tell () |
| Tells the current position in the stream.
|
|
| stream_eof () |
| Tells if we are at the end of the stream.
|
|
| stream_stat () |
| Stream statistics.
|
|
| stream_seek ($offset, $whence) |
| Seek to a specific point in the stream.
|
|
Stream wrapper to convert markup of mostly-PHP templates into PHP prior to include().
Based in large part on the example at http://www.php.net/manual/en/function.stream-wrapper-register.php
As well as the example provided at: http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/ written by Mike Naberezny (Paul M. Jones ( http://paul-m-jones.com)
Tells if we are at the end of the stream.
- Returns
- bool
stream_open |
( |
|
$path, |
|
|
|
$mode, |
|
|
|
$options, |
|
|
& |
$opened_path |
|
) |
| |
Opens the script file and converts markup.
- Parameters
-
string | $path | |
| $mode | |
| $options | |
| $opened_path | |
- Returns
- bool
If reading the file failed, update our local stat store to reflect the real stat of the file, then return on failure
Convert <?= ?> to long-form <?php echo ?> and <?php ?> to <?php ?>
file_get_contents() won't update PHP's stat cache, so we grab a stat of the file to prevent additional reads should the script be requested again, which will make include() happy.
Reads from the stream.
- Parameters
-
- Returns
- string
stream_seek |
( |
|
$offset, |
|
|
|
$whence |
|
) |
| |
Seek to a specific point in the stream.
- Parameters
-
- Returns
- bool
Stream statistics.
- Returns
- array
Tells the current position in the stream.
- Returns
- int
Included so that __FILE__ returns the appropriate info.
- Returns
- array