Koowa_Template
[ class tree: Koowa_Template ] [ index: Koowa_Template ] [ all elements ]

Class: KTemplateStream

Source Location: /libraries/koowa/template/stream.php

Class Overview


Abstract stream wrapper to convert markup of mostly-PHP templates into PHP prior to include().


Author(s):

Variables

Methods



Class Details

[line 20]
Abstract 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




Tags:

author:  Johan Janssens <johan@nooku.org>


[ Top ]


Class Variables

$_data =

[line 34]

Template data



Tags:

access:  private

Type:   string


[ Top ]

$_path =

[line 48]

Template path



Tags:

access:  private

Type:   string


[ Top ]

$_pos =  0

[line 27]

Current stream position.



Tags:

access:  private

Type:   int


[ Top ]

$_stat =

[line 41]

Stream stats.



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


static method register [line 55]

static void register( )

Register the stream wrapper

Function prevents from registering the wrapper twice




Tags:

access:  public


[ Top ]

method stream_cast [line 164]

bool stream_cast( int $cast_as)

Signal that stream_select is not supported by returning false



Tags:

return:  Always returns false as there is nounderlaying resource to return.
access:  public


Parameters:

int   $cast_as   Can be STREAM_CAST_FOR_SELECT or STREAM_CAST_AS_STREAM

[ Top ]

method stream_close [line 153]

void stream_close( )

Close the stream



Tags:

access:  public


[ Top ]

method stream_eof [line 122]

bool stream_eof( )

Tells if we are at the end of the stream.



Tags:

access:  public


[ Top ]

method stream_flush [line 142]

boolean stream_flush( )

Flushes the output



Tags:

access:  public


[ Top ]

method stream_open [line 72]

boolean stream_open( string $path)

Opens the template file and converts markup.

This function filters the data from the stream by pushing it through the template's read filter chain. The template object to use for filtering is the top node on the template stack




Tags:

access:  public


Parameters:

string   $path   The stream path

[ Top ]

method stream_read [line 100]

string stream_read( $count)

Reads from the stream.



Tags:

access:  public


Parameters:

   $count  

[ Top ]

method stream_seek [line 174]

bool stream_seek( $offset, $whence)

Seek to a specific point in the stream.



Tags:

access:  public


Parameters:

   $offset  
   $whence  

[ Top ]

method stream_stat [line 132]

array stream_stat( )

Stream statistics.



Tags:

access:  public


[ Top ]

method stream_tell [line 112]

int stream_tell( )

Tells the current position in the stream.



Tags:

access:  public


[ Top ]

method url_stat [line 222]

array url_stat( string $path, int $flags)

Url statistics.

This method is called in response to all stat() related functions on the stream




Tags:

access:  public


Parameters:

string   $path   The file path or URL to stat
int   $flags   Holds additional flags set by the streams API

[ Top ]


Documentation generated on Sun, 19 May 2013 03:06:10 +0200 by phpDocumentor 1.4.3