Sitellite Application Framework
Class Tree         Index         All Elements

Class: XT

Source Location: Program_Root/XML/XT.php

Class Overview




Variables

Methods


Child Classes

Inherited Variables

Inherited Methods


Class Details

[line 139]


[ Top ]


Class Variables

$buildToc =  false

[line 295]

Determines whether the template should build a table of contents (TOC) based on HTML header tags found within.

Defaults to false, and must be set to true in order to generate TOCs.




Tags:

access:  public

Type:   mixed


[ Top ]

$cacheCount =  0

[line 341]

Used to generate an auto-incrementing ID value for cache elements that are missing an "id" attribute (so as to make the attribute optional).



Tags:

access:  public

Type:   mixed


[ Top ]

$cacheDuration =  3600

[line 331]

How long in seconds to store the cached elements before regenerating them. May be overridden with the duration attribute of the cache tag. Defaults to 3600 which is one hour.



Tags:

access:  public

Type:   mixed


[ Top ]

$cacheLocation =  'store:cache/templates/'

[line 321]

Location to store cached contents in. Defaults to 'store:cache/templates/'. Note that the scope will be appended to the $cacheLocation for each cacheable element.



Tags:

access:  public

Type:   mixed


[ Top ]

$error =

[line 379]

The error message, if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$err_byte =

[line 395]

The error byte number, if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$err_code =

[line 387]

The error code, if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$err_colnum =

[line 411]

The error column number, if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$err_line =

[line 403]

The error line number, if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$exp =

[line 363]

The XTE object used to evaluate expressions in XT tags.



Tags:

access:  public

Type:   mixed


[ Top ]

$file =  false

[line 354]

Contains the name of the file currently being processed.

This is set in the getDoc() method, so technically it will set the current file even when you're just retrieving its contents. This shouldn't affect its validity for most uses, but when you want to retrieve the last parsed file, it means you have to do so prior to calling getDoc() again, either directly or indirectly.




Tags:

access:  public

Type:   mixed


[ Top ]

$isHtml =  true

[line 267]

Determines whether the template should be treated as HTML or a different kind of markup. This affects tags such as xt:intl where an HTML span tag can be added to surround the string.



Tags:

access:  public

Type:   mixed


[ Top ]

$output =  ''

[line 156]

The output of the current fill() call.



Tags:

access:  public

Type:   mixed


[ Top ]

$path =  ''

[line 148]

The path to the template directory.



Tags:

access:  public

Type:   mixed


[ Top ]

$prefix =  'xt:'

[line 255]

The current XML namespace XT is looking for to find command tags and attributes.



Tags:

access:  public

Type:   mixed


[ Top ]

$selfClosing = array (
      'img',
      'br',
      'hr',
      'meta',
      'link',
      'area',
   )

[line 277]

Contains a list of tags that are self-closing (ie.

they do not contain any data, such as a br tag). This list is only referenced if $isHtml is true.




Tags:

access:  public

Type:   mixed


[ Top ]

$toc = array ()

[line 303]

The list of HTML headers found in the document.



Tags:

access:  public

Type:   mixed


[ Top ]

$_addToHeader =  false

[line 305]


Type:   mixed


[ Top ]

$_bind_attrs = array ()

[line 309]


Type:   mixed


[ Top ]

$_bind_list = array ()

[line 307]


Type:   mixed


[ Top ]

$_bind_parts = array ()

[line 311]


Type:   mixed


[ Top ]



Class Methods


constructor XT [line 429]

XT XT( [string $path = ''], [string $prefix = XT_DEFAULT_PREFIX])

Constructor method. $prefix is either XT_DEFAULT_PREFIX,

XT_POST_PREFIX, or a custom prefix. The prefix is essentially the XML namespace XT is to recognize. The use of multiple namespaces can allow you to partially parse a template, cache that, then parse the rest which might contain user-specific content such as personal information. XT_DEFAULT_PREFIX and XT_POST_PREFIX are constants defined by this package.




Tags:

access:  public


Parameters:

string   $path  
string   $prefix  

[ Top ]

method bind [line 795]

void bind( string $path, string $data)

Bind some content to the specified tag.



Tags:

access:  public


Parameters:

string   $path  
string   $data  

[ Top ]

method bindAttr [line 815]

void bindAttr( string $path, string $attr, string $value)

Bind an attribute to the specified tag.



Tags:

access:  public


Parameters:

string   $path  
string   $attr  
string   $value  

[ Top ]

method box [line 870]

string box( string $name, [associative $parameters = array ()])

Executes the specified box using the Sitellite box API, which is essentially just an include. Note: This is now an alias for the loader_box() function.



Tags:

access:  public


Parameters:

string   $name  
associative   $parameters   array $parameters

[ Top ]

method convertEntities [line 1082]

string convertEntities( string $data)

Converts HTML entities into XT-compatible ch:entity tags.



Tags:

access:  public


Parameters:

string   $data  

[ Top ]

method fill [line 567]

string fill( string $data, [object $obj = ''], [boolean $carry = false])

Executes a template. $obj is an optional object you can pass to the template, which makes its properties immediately available to the template. $carry is used internally to determine whether to reset the object register before executing.



Tags:

access:  public


Parameters:

string   $data  
object   $obj  
boolean   $carry  

[ Top ]

method form [line 893]

string form( string $name)

Executes the specified form using the Sitellite form API, which is essentially just an include of a file that defines a subclass of saf.MailForm. Note: This is now an alias for the loader_form() function.



Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method ignoreUntilLevel [line 492]

void ignoreUntilLevel( [mixed $level = false])



[ Top ]

method makeToc [line 1894]

string makeToc( [string $title = ''])

Generates a table of contents as an HTML unordered list, based on the $toc property. Note: Also requires $buildToc to be set to true.



Tags:

access:  public


Parameters:

string   $title  

[ Top ]

method messy [line 840]

string messy( string $data, [object $obj = ''], [boolean $carry = false])

Uses the saf.HTML.Messy package to implement a "messy" parser in XT, allowing for invalid markup in templates (ie.

HTML instead of XHTML). Of course since the markup accepted is invalid, your mileage may vary. This method is discouraged unless you have a good reason for using it.




Tags:

access:  public


Parameters:

string   $data  
object   $obj  
boolean   $carry  

[ Top ]

method path [line 484]

string path( )

Returns either the contents of the $path property, or the current working directory, which should be used as the path instead.



Tags:

access:  public


[ Top ]

method reverseEntities [line 1060]

string reverseEntities( string $data)

Reverses the conversion of HTML entities to XT-compatible ch:entity tags.



Tags:

access:  public


Parameters:

string   $data  

[ Top ]

method validate [line 516]

boolean validate( string $data)

Validates a template to see if it is a valid XML document.



Tags:

access:  public


Parameters:

string   $data  

[ Top ]

method wrap [line 998]

string wrap( string $str)

Wraps $str in xt:tpl tags and returns it.



Tags:

access:  public


Parameters:

string   $str  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:20:25 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2