Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • BaseTemplate
  • CachingHelper
  • CurlyBracketsMacros
  • LatteFilter
  • LatteMacros
  • SnippetHelper
  • Template
  • TemplateCacheStorage
  • TemplateFilters
  • TemplateHelpers

Interfaces

  • IFileTemplate
  • ITemplate
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class BaseTemplate

Template.

Nette\Object
Extended by Nette\Templates\BaseTemplate implements Nette\Templates\ITemplate

Direct known subclasses

Nette\Templates\Template
Abstract
Namespace: Nette\Templates
Author: David Grudl
Located at Templates/BaseTemplate.php
Methods summary
public
# registerFilter( callback $callback )

Registers callback as template compile-time filter.

Registers callback as template compile-time filter.

Parameters

$callback
callback
final public array
# getFilters( )

Returns all registered compile-time filters.

Returns all registered compile-time filters.

Returns

array
public
# render( )

Renders template to output.

Renders template to output.

Implementation of

Nette\Templates\ITemplate::render
public string
# __toString( )

Renders template to string.

Renders template to string.

Returns

string
protected string
# compile( string $content, string $label = NULL )

Applies filters on template content.

Applies filters on template content.

Parameters

$content
string
$label
string

Returns

string
public
# registerHelper( string $name, callback $callback )

Registers callback as template run-time helper.

Registers callback as template run-time helper.

Parameters

$name
string
$callback
callback
public
# registerHelperLoader( callback $callback )

Registers callback as template run-time helpers loader.

Registers callback as template run-time helpers loader.

Parameters

$callback
callback
final public array
# getHelpers( )

Returns all registered run-time helpers.

Returns all registered run-time helpers.

Returns

array
public mixed
# __call( string $name, array $args )

Call a template run-time helper. Do not call directly.

Call a template run-time helper. Do not call directly.

Parameters

$name
string
helper name
$args
array
arguments

Returns

mixed

Throws

MemberAccessException
public Nette\Templates\BaseTemplate
# setTranslator( Nette\ITranslator $translator = NULL )

Sets translate adapter.

Sets translate adapter.

Parameters

$translator
Nette\ITranslator

Returns

Nette\Templates\BaseTemplate
provides a fluent interface
public
# add( string $name, mixed $value )

Adds new template parameter.

Adds new template parameter.

Parameters

$name
string
name
$value
mixed
value
public Nette\Templates\BaseTemplate
# setParams( array $params )

Sets all parameters.

Sets all parameters.

Parameters

$params
array

Returns

Nette\Templates\BaseTemplate
provides a fluent interface
public array
# getParams( )

Returns array of all parameters.

Returns array of all parameters.

Returns

array
public
# __set( string $name, mixed $value )

Sets a template parameter. Do not call directly.

Sets a template parameter. Do not call directly.

Parameters

$name
string
name
$value
mixed
value

Throws

MemberAccessException
if the property is not defined or is read-only
public mixed &
# __get( string $name )

Returns a template parameter. Do not call directly.

Returns a template parameter. Do not call directly.

Parameters

$name
string
name

Returns

mixed
value

Throws

MemberAccessException
if the property is not defined.
public boolean
# __isset( string $name )

Determines whether parameter is defined. Do not call directly.

Determines whether parameter is defined. Do not call directly.

Parameters

$name
string
name

Returns

boolean
public
# __unset( string $name )

Removes a template parameter. Do not call directly.

Removes a template parameter. Do not call directly.

Parameters

$name
string
name

Throws

MemberAccessException
public static string
# optimizePhp( string $source )

Removes unnecessary blocks of PHP code.

Removes unnecessary blocks of PHP code.

Parameters

$source
string

Returns

string
Methods inherited from Nette\Object
__callStatic(), extensionMethod(), getReflection()
Properties summary
public boolean $warnOnUndefined TRUE
#
public array $onPrepareFilters array()
#

of function(BaseTemplate $sender); Occurs before a template is compiled - implement to customize the filters

of function(BaseTemplate $sender); Occurs before a template is compiled - implement to customize the filters

Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0