Renderer/Adapter/Stream/Wrapper.php
public function stream_open($uri, $mode, $options, &$opened_path)
    {

        //Abstract mb_* functions to get UTF-8 working correctly in this bitch
        $substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';
        $strlen = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';
        $strpos = function_exists('mb_strpos') ? 'mb_strpos' : 'strpos';

        //Our data URI could look like this:
        // tale-jade://data;<base64-encoded-phtml>
        //We strip everything behind th first ;, the result would be only
        // <base64-encoded-phtml>
        //We decode that and $_data will contain only the pure, compiled PHTML
        //ready for inclusion
        $this->data = base64_decode($substr($uri, $strpos($uri, ';') + 1));

        $this->position = 0;
        $this->length = $strlen($this->data);

        return true;
    }
public function stream_open($uri, $mode, $options, &$opened_path)
    {

        //Abstract mb_* functions to get UTF-8 working correctly in this bitch
        $substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';
        $strlen = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';
        $strpos = function_exists('mb_strpos') ? 'mb_strpos' : 'strpos';

        //Our data URI could look like this:
        // tale-jade://data;<base64-encoded-phtml>
        //We strip everything behind th first ;, the result would be only
        // <base64-encoded-phtml>
        //We decode that and $_data will contain only the pure, compiled PHTML
        //ready for inclusion
        $this->data = base64_decode($substr($uri, $strpos($uri, ';') + 1));

        $this->position = 0;
        $this->length = $strlen($this->data);

        return true;
    }
public function stream_open ( $ uri , $ mode , $ options , & $ opened_path ) { //Abstract mb_* functions to get UTF-8 working correctly in this bitch $ substr = function_exists ( 'mb_substr' ) ? 'mb_substr' : 'substr' ; $ strlen = function_exists ( 'mb_strlen' ) ? 'mb_strlen' : 'strlen' ; $ strpos = function_exists ( 'mb_strpos' ) ? 'mb_strpos' : 'strpos' ; //Our data URI could look like this: // tale-jade://data;<base64-encoded-phtml> //We strip everything behind th first ;, the result would be only // <base64-encoded-phtml> //We decode that and $_data will contain only the pure, compiled PHTML //ready for inclusion $ this -> data = base64_decode ( $ substr ( $ uri , $ strpos ( $ uri , ';' ) + 1 ) ) ; $ this -> position = 0 ; $ this -> length = $ strlen ( $ this -> data ) ; return true ; }
This gets called when a url-stream is opened with the wrapper-scheme.

(e.g. fopen('tale-jade://data;...'), INCLUDE('tale-jade://data;...')

@param string $uri          the Data-URI this stream was opened with
@param string $mode         the stream read/write-mode (useless here)
@param int    $options      the flags for this stream instance (useless here)
@param string &$opened_path the path that got actually opened (useless here)

@return bool
This gets called when a url - stream is opened with the wrapper - scheme .