API > eden > template.php
View Source

class Eden_Template

General available methods for common templating procedures


  • ENGINE_PATTERN: !{([@$])([A-Za-z0-9:_]+)}|{([A-Za-z:_][A-Za-z0-9:_]*)(\s*,(.+?))?(/}|}(.*?){/\\3})!s

Public Methods

public function set($data, $value = NULL)

Sets template variables


  1. array|string
  2. mixed

Returns this

public function parseString($string)

Simple string replace template parser


  1. *string template file

Returns string

public function parsePhp($____file, $___evalString = false)

For PHP templates, this will transform the given document to an actual page or partial


  1. *string template file or PHP template string
  2. bool whether to evaluate the first argument

Returns string

public function parseEngine($template, $callback = NULL)

Engine Parser ex {$title} ex {products}{$title}{/products}


  1. string template
  2. callback to be used when key does not exist in data

Returns string

class Eden_Template_Error

Template Errors

© 2012 Openovate Labs. All rights reserved.