model/modx/smarty/modsmarty.class.php
- package
- modx
- subpackage
- smarty
- Classes
- modSmarty
Description
\modSmarty
- Extends from
- \Smarty
- package
- modx
- subpackage
- smarty
- Properties
- $_blocks
- $_derived
- $modx
- $smarty
- Methods
- __construct
- display
- fetch
- setCachePath
- setTemplatePath
Description
An extension of the Smarty class for use with modX.
Automatically sets appropriate configuration variables for Smarty in the MODX context.
Properties
$_blocks
array $_blocks = ''
Any custom blocks loaded
Details
- array
- visibility
- public
- default
- final
- false
- static
- false
- access
- private
$_derived
mixed $_derived = ''
The derived block loaded
Details
- mixed
- visibility
- public
- default
- final
- false
- static
- false
- access
- private
$modx
\modX $modx = 'null'
A reference to the modX instance
Details
-
\modX
- visibility
- public
- default
- null
- final
- false
- static
- false
- access
- protected
$smarty
\Smarty $smarty = ''
A reference to the Smarty instance
Details
- \Smarty
- visibility
- public
- default
- final
- false
- static
- false
- access
- protected
Methods
__construct
__construct(
\modX $modx, array $params
=
array
)
:
Arguments
- $modx
- \modX
A reference to the modX object - $params
- array
An array of configuration parameters
Details
- visibility
- public
- final
- false
- static
- false
display
display(
string $resource_name
)
:
Display the template through an echo statement.
Arguments
- $resource_name
- string
The resource location
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
fetch
fetch(
string $resource_name
)
:
string
Fetch the template output without displaying it.
Arguments
- $resource_name
- string
The resource location
Output
- string
- The fetched resource output
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
setCachePath
setCachePath(
string $path
)
:
Sets the cache path for this Smarty instance
Arguments
- $path
- string
The path to set. Defaults to '', which in turn defaults to $this->modx->cachePath.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
setTemplatePath
setTemplatePath(
string $path
)
:
boolean
Sets the template path for this Smarty instance
Arguments
- $path
- string
The path to set.
Output
- boolean
- True if successful
Details
- visibility
- public
- final
- false
- static
- false
- access
- public