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

Class: QueryTemplatesTemplate

Source Location: /home/bob/workspace/QueryTemplates/src/QueryTemplatesTemplate.php

Class Overview


Class defining main namespace of the template.


Author(s):

Implements interfaces:

Variables

Methods



Class Details

[line 21]
Class defining main namespace of the template.

Use template() function as shortcut.




Tags:

author:  Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
link:  http://code.google.com/p/querytemplates/
license:  MIT License


[ Top ]


Class Variables

$cache =  true

[line 31]



Tags:

access:  public

Type:   mixed


[ Top ]

$language =  'php'

[line 29]



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 30]



Tags:

access:  public

Type:   mixed


[ Top ]

$parse =

[line 28]

QueryTemplatesParse object



Tags:

access:  public



[ Top ]

$toFetch = array(
      // [0] path, [1] name, [2] parse php tags
      'full'   => array(),// [0] path, [1] replicator object, [2] parse php tags
'parts'=>array(),)

[line 36]



Tags:

todo:  refactor: "toCollect"
access:  public

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 47]

QueryTemplatesTemplate __construct( [string $name = null], [ $language = 'php'])

Enter description here...



Tags:

access:  public


Parameters:

string   $name   Optional.
   $language  

[ Top ]

method generateName [line 176]

void generateName( )



Tags:

access:  protected


[ Top ]

method includeClasses [line 189]

void includeClasses( )



Tags:

TODO:  move to QueryTemplates static namespace
access:  protected


[ Top ]

method parse [line 134]

String|QueryTemplatesParse parse( [string $autoSource = null])

Start template parsing stage and changes namespace to @see QueryTemplatesParse.



Tags:

TODO:  support multiplie $autoSources
access:  public


Parameters:

string   $autoSource   Used to achieve equivalent of following code: ->sourceCollect($source)->parse()->source($source)->returnReplace()

[ Top ]

method save [line 232]

void save( [ $callback = null], [ $activeCallback = true])



Parameters:

   $callback  
   $activeCallback  

[ Top ]

method sourceCollect [line 75]

QueryTemplatesTemplate sourceCollect( string|Callback $path, [String $name = null])

Fetches file or URL and collects it content.



Tags:

TODO:  content-type
access:  public


Parameters:

string|Callback   $path  
String   $name   Optional. Defaults to file name.

[ Top ]

method sourceCollectPHP [line 100]

QueryTemplatesTemplate sourceCollectPHP( string|Callback $path, [string $name = null])

Fetches PHP source file or URL and collects it content.



Tags:

see:  QueryTemplatesTemplate::sourceCollect()
access:  public


Parameters:

string|Callback   $path  
string   $name  

[ Top ]

method sourceQuery [line 64]

QueryTemplatesSourceQuery sourceQuery( string|Callback $path)

Fetches file or URL and returns phpQuery object with additional collect() method to collect specific part(s) of document.

It has to be ended with one of followings:

  • sourceEnd()
  • parse()
  • any other source*() method




Tags:

TODO:  content-type
access:  public


Parameters:

string|Callback   $path  

[ Top ]

method sourceQueryPHP [line 112]

QueryTemplatesSourceQuery sourceQueryPHP( string|Callback $path, [string $name = null])

Fetches PHP souce file or URL and returns phpQuery object with additional collect() method to collect specific part(s) of document.



Tags:

see:  QueryTemplatesTemplate::sourceQuery()
access:  public


Parameters:

string|Callback   $path  
string   $name  

[ Top ]

method sourceTemplate [line 122]

unknown sourceTemplate( unknown_type $name)

Enter description here...



Tags:

TODO:  sourceTemplate
access:  public


Parameters:

unknown_type   $name  

[ Top ]

method templateCache [line 165]

QueryTemplatesTemplate templateCache( [Bool $state = null])

Disable or enables cache engine for this template.

Chainable when $state is passed. Otherwise returns actual cache's setting.




Tags:

see:  QueryTemplates::$cacheTimeout
access:  public



Implementation of:
IQueryTemplatesTemplateChain::templateCache()

Parameters:

Bool   $state   False to disable cache, True to enable.

[ Top ]

method templateName [line 221]

void templateName( [unknown_type $newName = null])

Returns or changes template's name.




Implementation of:
IQueryTemplatesTemplateChain::templateName()

Parameters:

unknown_type   $newName  

[ Top ]

method _sourceFetch [line 82]

void _sourceFetch( $path, [ $onlySomeParts = false], [ $name = null], [ $php = false])



Tags:

access:  protected


Parameters:

   $path  
   $onlySomeParts  
   $name  
   $php  

[ Top ]

method __toString [line 227]

void __toString( )



[ Top ]


Documentation generated on Sat, 07 Mar 2009 12:08:55 +0100 by phpDocumentor 1.4.2