Question

I'm looking through the Zend_View source and I see this:

include 'zend.view://' . func_get_arg(0);

what does the string "zend.view://" represent and how would the include statement resolve that in php?

Was it helpful?

Solution

It represents a custom stream wrapper, see here: http://www.php.net/manual/en/intro.stream.php.

Zend_View_Stream defines it and, looking at the docs, it simply makes sure that your view script continues to work even if short tags aren't enabled on your php instance.

What would happen is that PHP resolves that url scheme as being defined in a class (after you've registered it using stream_wrapper_register) and uses methods in there (stream_open, stream_read etc.) to actually open and read the contents of the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top