Wismas  1.1
BTS SN-IR La Salle Avignon 2017
Fonctions membres publiques | Fonctions membres publiques statiques | Attributs publics | Attributs publics statiques | Fonctions membres privées | Attributs privés | Attributs privés statiques
Référence de la classe Smarty
Graphe d'héritage de Smarty:
Inheritance graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 __construct ()
 templateExists ($resource_name)
 getGlobal ($varname=null)
 enableSecurity ($security_class=null)
 disableSecurity ()
 setTemplateDir ($template_dir, $isConfig=false)
 addTemplateDir ($template_dir, $key=null, $isConfig=false)
 getTemplateDir ($index=null, $isConfig=false)
 setConfigDir ($config_dir)
 addConfigDir ($config_dir, $key=null)
 getConfigDir ($index=null)
 setPluginsDir ($plugins_dir)
 addPluginsDir ($plugins_dir)
 getPluginsDir ()
 setCompileDir ($compile_dir)
 getCompileDir ()
 setCacheDir ($cache_dir)
 getCacheDir ()
 createTemplate ($template, $cache_id=null, $compile_id=null, $parent=null, $do_clone=true)
 loadPlugin ($plugin_name, $check=true)
 _getTemplateId ($template_name, $cache_id=null, $compile_id=null, $caching=null)
 _realpath ($path, $realpath=null)
 setCompileCheck ($compile_check)
 setUseSubDirs ($use_sub_dirs)
 setErrorReporting ($error_reporting)
 setEscapeHtml ($escape_html)
 setAutoLiteral ($auto_literal)
 setForceCompile ($force_compile)
 setMergeCompiledIncludes ($merge_compiled_includes)
 setLeftDelimiter ($left_delimiter)
 setRightDelimiter ($right_delimiter)
 setDebugging ($debugging)
 setConfigOverwrite ($config_overwrite)
 setConfigBooleanize ($config_booleanize)
 setConfigReadHidden ($config_read_hidden)
 setCompileLocking ($compile_locking)
 setDefaultResourceType ($default_resource_type)
 setCachingType ($caching_type)
 testInstall (&$errors=null)
 __destruct ()
 __get ($name)
 __set ($name, $value)

Fonctions membres publiques statiques

static mutingErrorHandler ($errno, $errstr, $errfile, $errline, $errcontext)
static muteExpectedErrors ()
static unmuteExpectedErrors ()

Attributs publics

const SMARTY_VERSION = '3.1.29'
const SCOPE_LOCAL = 0
const SCOPE_PARENT = 2
const SCOPE_TPL_ROOT = 4
const SCOPE_ROOT = 8
const SCOPE_SMARTY = 16
const SCOPE_GLOBAL = 32
const SCOPE_BUBBLE_UP = 64
const CACHING_OFF = 0
const CACHING_LIFETIME_CURRENT = 1
const CACHING_LIFETIME_SAVED = 2
const CLEAR_EXPIRED = - 1
const COMPILECHECK_OFF = 0
const COMPILECHECK_ON = 1
const COMPILECHECK_CACHEMISS = 2
const DEBUG_OFF = 0
const DEBUG_ON = 1
const DEBUG_INDIVIDUAL = 2
const PHP_PASSTHRU = 0
const PHP_QUOTE = 1
const PHP_REMOVE = 2
const PHP_ALLOW = 3
const FILTER_POST = 'post'
const FILTER_PRE = 'pre'
const FILTER_OUTPUT = 'output'
const FILTER_VARIABLE = 'variable'
const PLUGIN_FUNCTION = 'function'
const PLUGIN_BLOCK = 'block'
const PLUGIN_COMPILER = 'compiler'
const PLUGIN_MODIFIER = 'modifier'
const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'
const RESOURCE_CACHE_OFF = 0
const RESOURCE_CACHE_AUTOMATIC = 1
const RESOURCE_CACHE_TEMPLATE = 2
const RESOURCE_CACHE_ON = 4
 $auto_literal = true
 $error_unassigned = false
 $use_include_path = false
 $_joined_template_dir = null
 $_joined_config_dir = null
 $default_template_handler_func = null
 $default_config_handler_func = null
 $default_plugin_handler_func = null
 $force_compile = false
 $compile_check = true
 $use_sub_dirs = false
 $allow_ambiguous_resources = false
 $merge_compiled_includes = false
 $force_cache = false
 $left_delimiter = "{"
 $right_delimiter = "}"
 $security_class = 'Smarty_Security'
 $security_policy = null
 $php_handling = self::PHP_PASSTHRU
 $allow_php_templates = false
 $debugging = false
 $debugging_ctrl = 'NONE'
 $smarty_debug_id = 'SMARTY_DEBUG'
 $debug_tpl = null
 $error_reporting = null
 $config_overwrite = true
 $config_booleanize = true
 $config_read_hidden = false
 $compile_locking = true
 $cache_locking = false
 $locking_timeout = 10
 $default_resource_type = 'file'
 $caching_type = 'file'
 $default_config_type = 'file'
 $resource_cache_mode = 1
 $cache_modified_check = false
 $registered_plugins = array()
 $registered_objects = array()
 $registered_classes = array()
 $registered_filters = array()
 $registered_resources = array()
 $registered_cache_resources = array()
 $autoload_filters = array()
 $default_modifiers = array()
 $escape_html = false
 $start_time = 0
 $_current_file = null
 $_parserdebug = false
 $_objType = 1
 $_debug = null

Attributs publics statiques

static $global_tpl_vars = array()
static $_previous_error_handler = null
static $_muted_directories = array()
static $_MBSTRING = SMARTY_MBSTRING
static $_CHARSET = SMARTY_RESOURCE_CHAR_SET
static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT
static $_UTF8_MODIFIER = 'u'
static $_IS_WINDOWS = false

Fonctions membres privées

 _addDir ($dirName, $dir, $key=null)

Attributs privés

 $template_dir = array('./templates/')
 $compile_dir = './templates_c/'
 $plugins_dir = null
 $cache_dir = './cache/'
 $config_dir = array('./configs/')

Attributs privés statiques

static $obsoleteProperties
static $accessMap

Documentation des constructeurs et destructeur

#@- Initialize new Smarty object

Références $_CHARSET, $_IS_WINDOWS, $_UTF8_MODIFIER, et $global_tpl_vars.

Référencé par SmartyBC\__construct().

    {
        parent::__construct();
        if (is_callable('mb_internal_encoding')) {
            mb_internal_encoding(Smarty::$_CHARSET);
        }
        $this->start_time = microtime(true);

        if (isset($_SERVER['SCRIPT_NAME'])) {
            Smarty::$global_tpl_vars['SCRIPT_NAME'] = new Smarty_Variable($_SERVER['SCRIPT_NAME']);
        }

        // Check if we're running on windows
        Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';

        // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8
        if (Smarty::$_CHARSET !== 'UTF-8') {
            Smarty::$_UTF8_MODIFIER = '';
        }
    }

Class destructor

    {
        $i = 0;// intentionally left blank
    }

Documentation des fonctions membres

Smarty::__get ( name)

<<magic>> Generic getter. Calls the appropriate getter function. Issues an E_USER_NOTICE if no valid getter is found.

Paramètres:
string$nameproperty name
Renvoie:
mixed
    {

        if (isset(self::$accessMap[$name])) {
            $method = 'get' . self::$accessMap[$name];
            return $this->{$method}();
        } elseif (in_array($name, self::$obsoleteProperties)) {
            return null;
        } else {
            trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE);
        }
    }
Smarty::__set ( name,
value 
)

<<magic>> Generic setter. Calls the appropriate setter function. Issues an E_USER_NOTICE if no valid setter is found.

Paramètres:
string$nameproperty name
mixed$valueparameter passed to setter
    {
        if (isset(self::$accessMap[$name])) {
            $method = 'set' . self::$accessMap[$name];
            $this->{$method}($value);
        } elseif (in_array($name, self::$obsoleteProperties)) {
            return;
        } else {
            if (is_object($value) && method_exists($value, $name)) {
                $this->$name = $value;
            } else {
                trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE);
            }
        }
    }
Smarty::_addDir ( dirName,
dir,
key = null 
) [private]

add directories to given property name

Paramètres:
string$dirNamedirectory property name
string | array$dirdirectory string or array of strings
mixed$keyoptional key

Références _realpath().

Référencé par addTemplateDir().

    {
        $rp = $this->_cache[$dirName];
        if (is_array($dir)) {
            foreach ($dir as $k => $v) {
                $path = $rp ? $this->_realpath($v . DS, true) : $v;
                if (is_int($k)) {
                    // indexes are not merged but appended
                    $this->{$dirName}[] = $path;
                } else {
                    // string indexes are overridden
                    $this->{$dirName}[$k] = $path;
                }
            }
        } else {
            $path = $rp ? $this->_realpath($dir . DS, true) : $dir;
            if ($key !== null) {
                // override directory at specified index
                $this->{$dirName}[$key] = $path;
            } else {
                // append new directory
                $this->{$dirName}[] = $path;
            }
        }
    }
Smarty::_getTemplateId ( template_name,
cache_id = null,
compile_id = null,
caching = null 
)

Get unique template id

Paramètres:
string$template_name
null | mixed$cache_id
null | mixed$compile_id
null$caching
Renvoie:
string

Référencé par createTemplate().

    {
        $cache_id = $cache_id === null ? $this->cache_id : $cache_id;
        $compile_id = $compile_id === null ? $this->compile_id : $compile_id;
        $caching = (int) ($caching === null ? $this->caching : $caching);

        if ($this->allow_ambiguous_resources) {
            $_templateId =
                Smarty_Resource::getUniqueTemplateName($this, $template_name) . "#{$cache_id}#{$compile_id}#{$caching}";
        } else {
            $_templateId = $this->_joined_template_dir . "#{$template_name}#{$cache_id}#{$compile_id}#{$caching}";
        }
        if (isset($_templateId[150])) {
            $_templateId = sha1($_templateId);
        }
        return $_templateId;
    }
Smarty::_realpath ( path,
realpath = null 
)

Normalize path

  • remove /./ and /../
  • make it absolute if required
Paramètres:
string$pathfile path
bool$realpathleave $path relative
Renvoie:
string

Référencé par _addDir(), getCacheDir(), getCompileDir(), getPluginsDir(), getTemplateDir(), setCacheDir(), et setCompileDir().

    {
        static $pattern = null;
        static $nds = null;
        if ($pattern == null) {
            $nds = DS == '/' ? '\\' : '/';
            $ds = '\\' . DS;
            $pattern =
                "#([{$ds}]+[^{$ds}]+[{$ds}]+[.]([{$ds}]+[.])*[.][{$ds}]+([.][{$ds}]+)*)|([{$ds}]+([.][{$ds}]+)+)|[{$ds}]{2,}#";
        }
        // normalize DS
        if (strpos($path, $nds) !== false) {
            $path = str_replace($nds, DS, $path);
        }

        if ($realpath === true && (($path[0] !== '/' && DS == '/') || ($path[1] !== ':' && DS != '/'))) {
            $path = getcwd() . DS . $path;
        }
        while ((strpos($path, '.' . DS) !== false) || (strpos($path, DS . DS) !== false)) {
            $path = preg_replace($pattern, DS, $path);
        }
        if ($realpath === false && ($path[0] == '/' || $path[1] == ':')) {
            $path = str_ireplace(getcwd(), '.', $path);
        }
        return $path;
    }
Smarty::addConfigDir ( config_dir,
key = null 
)

Add config directory(s)

Paramètres:
string | array$config_dirdirectory(s) of config sources
mixed$keykey of the array element to assign the config dir to
Renvoie:
Smarty current Smarty instance for chaining

Références $config_dir, et addTemplateDir().

    {
        return $this->addTemplateDir($config_dir, $key, true);
    }
Smarty::addPluginsDir ( plugins_dir)

Adds directory of plugin files

Paramètres:
$plugins_dir
Renvoie:
Smarty current Smarty instance for chaining

Références $plugins_dir.

    {
        if (!isset($this->plugins_dir)) {
            $this->plugins_dir = array(SMARTY_PLUGINS_DIR);
        }
        $this->plugins_dir = array_merge((array) $this->plugins_dir, (array) $plugins_dir);
        if (isset($this->_cache['plugins_dir'])) {
            unset($this->_cache['plugins_dir']);
        }
        return $this;
    }
Smarty::addTemplateDir ( template_dir,
key = null,
isConfig = false 
)

Add template directory(s)

Paramètres:
string | array$template_dirdirectory(s) of template sources
string$keyof the array element to assign the template dir to
bool$isConfigtrue for config_dir
Renvoie:
Smarty current Smarty instance for chaining

Références $template_dir, et _addDir().

Référencé par addConfigDir().

    {
        $type = $isConfig ? 'config_dir' : 'template_dir';
        $joined = '_joined_' . $type;
        if (!isset($this->_cache[$type])) {
            $this->{$type} = (array) $this->{$type};
            $this->{$joined} = join(' # ', $this->{$type});
            $this->_cache[$type . '_new'] = true;
            $this->_cache[$type] = false;
        }
        $this->{$joined} .= ' # ' . join(' # ', (array) $template_dir);
        $this->_addDir($type, $template_dir, $key);
        return $this;
    }
Smarty::createTemplate ( template,
cache_id = null,
compile_id = null,
parent = null,
do_clone = true 
)

creates a template object

Paramètres:
string$templatethe resource handle of the template file
mixed$cache_idcache id to be used with this template
mixed$compile_idcompile id to be used with this template
object$parentnext higher level of Smarty variables
boolean$do_cloneflag is Smarty object shall be cloned
Renvoie:
object template object

Références _getTemplateId().

    {
        if ($cache_id !== null && (is_object($cache_id) || is_array($cache_id))) {
            $parent = $cache_id;
            $cache_id = null;
        }
        if ($parent !== null && is_array($parent)) {
            $data = $parent;
            $parent = null;
        } else {
            $data = null;
        }
        if ($this->caching &&
            isset($this->_cache['isCached'][$_templateId = $this->_getTemplateId($template, $cache_id, $compile_id)])
        ) {
            $tpl = $do_clone ? clone $this->_cache['isCached'][$_templateId] : $this->_cache['isCached'][$_templateId];
            $tpl->parent = $parent;
            $tpl->tpl_vars = array();
            $tpl->config_vars = array();
        } else {
            /* @var Smarty_Internal_Template $tpl */
            $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id, null, null);
        }
        if ($do_clone) {
            $tpl->smarty = clone $tpl->smarty;
        } elseif ($parent === null) {
            $tpl->parent = $this;
        }
        // fill data if present
        if (!empty($data) && is_array($data)) {
            // set up variable values
            foreach ($data as $_key => $_val) {
                $tpl->tpl_vars[$_key] = new Smarty_Variable($_val);
            }
        }
        if ($this->debugging || $this->debugging_ctrl == 'URL') {
            $tpl->smarty->_debug = new Smarty_Internal_Debug();
            // check URL debugging control
            if (!$this->debugging && $this->debugging_ctrl == 'URL') {
                $tpl->smarty->_debug->debugUrl($tpl->smarty);
            }
        }
        return $tpl;
    }

Disable security

Renvoie:
Smarty current Smarty instance for chaining
    {
        $this->security_policy = null;

        return $this;
    }
Smarty::enableSecurity ( security_class = null)

Loads security class and enables security

Paramètres:
string | Smarty_Security$security_classif a string is used, it must be class-name
Renvoie:
Smarty current Smarty instance for chaining
Exceptions:
SmartyExceptionwhen an invalid class name is provided

Références $security_class.

Get cache directory

Renvoie:
string path of cache directory

Références $_muted_directories, et _realpath().

    {
        if (!isset($this->_cache['cache_dir'])) {
            $this->cache_dir = $this->_realpath($this->cache_dir . DS, true);
            if (!isset(Smarty::$_muted_directories[$this->cache_dir])) {
                Smarty::$_muted_directories[$this->cache_dir] = null;
            }
            $this->_cache['cache_dir'] = true;
        }
        return $this->cache_dir;
    }

Get compiled directory

Renvoie:
string path to compiled templates

Références $_muted_directories, et _realpath().

    {
        if (!isset($this->_cache['compile_dir'])) {
            $this->compile_dir = $this->_realpath($this->compile_dir . DS, true);
            if (!isset(Smarty::$_muted_directories[$this->compile_dir])) {
                Smarty::$_muted_directories[$this->compile_dir] = null;
            }
            $this->_cache['compile_dir'] = true;
        }
        return $this->compile_dir;
    }
Smarty::getConfigDir ( index = null)

Get config directory

Paramètres:
mixed$indexindex of directory to get, null to get all
Renvoie:
array configuration directory

Références getTemplateDir().

    {
        return $this->getTemplateDir($index, true);
    }
Smarty::getGlobal ( varname = null)

Returns a single or all global variables

Paramètres:
string$varnamevariable name or null
Renvoie:
string variable value or or array of variables
    {
        if (isset($varname)) {
            if (isset(self::$global_tpl_vars[$varname])) {
                return self::$global_tpl_vars[$varname]->value;
            } else {
                return '';
            }
        } else {
            $_result = array();
            foreach (self::$global_tpl_vars AS $key => $var) {
                $_result[$key] = $var->value;
            }

            return $_result;
        }
    }

Get plugin directories

Renvoie:
array list of plugin directories

Références $plugins_dir, et _realpath().

    {
        if (!isset($this->_cache['plugins_dir'])) {
            if (!isset($this->plugins_dir)) {
                $this->plugins_dir = array(SMARTY_PLUGINS_DIR);
            } else {
                $plugins_dir = (array) $this->plugins_dir;
                $this->plugins_dir = array();
                foreach ($plugins_dir as $v) {
                    $this->plugins_dir[] = $this->_realpath($v . DS, true);
                }
                $this->plugins_dir = array_unique($this->plugins_dir);
            }
            $this->_cache['plugin_files'] = array();
            $this->_cache['plugins_dir'] = true;
        }
        return $this->plugins_dir;
    }
Smarty::getTemplateDir ( index = null,
isConfig = false 
)

Get template directories

Paramètres:
mixed$indexindex of directory to get, null to get all
bool$isConfigtrue for config_dir
Renvoie:
array list of template directories, or directory of $index

Références _realpath().

Référencé par getConfigDir().

    {
        $type = $isConfig ? 'config_dir' : 'template_dir';
        if (!isset($this->_cache[$type])) {
            $joined = '_joined_' . $type;
            $this->{$type} = (array) $this->{$type};
            $this->{$joined} = join(' # ', $this->{$type});
            $this->_cache[$type] = false;
        }
        if ($this->_cache[$type] == false) {
            foreach ($this->{$type} as $k => $v) {
                $this->{$type}[$k] = $this->_realpath($v . DS, true);
            }
            $this->_cache[$type . '_new'] = true;
            $this->_cache[$type] = true;
        }
        if ($index !== null) {
            return isset($this->{$type}[$index]) ? $this->{$type}[$index] : null;
        }
        return $this->{$type};
    }
Smarty::loadPlugin ( plugin_name,
check = true 
)

Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php

Paramètres:
string$plugin_nameclass plugin name to load
bool$checkcheck if already loaded
Exceptions:
SmartyException
Renvoie:
string |boolean filepath of loaded file or false
    {
        return $this->ext->loadPlugin->loadPlugin($this, $plugin_name, $check);
    }
static Smarty::muteExpectedErrors ( ) [static]

Enable error handler to mute expected messages

Renvoie:
void

Références $_previous_error_handler.

    {
        /*
            error muting is done because some people implemented custom error_handlers using
            http://php.net/set_error_handler and for some reason did not understand the following paragraph:

                It is important to remember that the standard PHP error handler is completely bypassed for the
                error types specified by error_types unless the callback function returns FALSE.
                error_reporting() settings will have no effect and your error handler will be called regardless -
                however you are still able to read the current value of error_reporting and act appropriately.
                Of particular note is that this value will be 0 if the statement that caused the error was
                prepended by the @ error-control operator.

            Smarty deliberately uses @filemtime() over file_exists() and filemtime() in some places. Reasons include
                - @filemtime() is almost twice as fast as using an additional file_exists()
                - between file_exists() and filemtime() a possible race condition is opened,
                  which does not exist using the simple @filemtime() approach.
        */
        $error_handler = array('Smarty', 'mutingErrorHandler');
        $previous = set_error_handler($error_handler);

        // avoid dead loops
        if ($previous !== $error_handler) {
            Smarty::$_previous_error_handler = $previous;
        }
    }
static Smarty::mutingErrorHandler ( errno,
errstr,
errfile,
errline,
errcontext 
) [static]

Error Handler to mute expected messages

integer $errno Error level $errstr $errfile $errline $errcontext boolean

Références $_muted_directories, et $_previous_error_handler.

    {
        $_is_muted_directory = false;

        // add the SMARTY_DIR to the list of muted directories
        if (!isset(Smarty::$_muted_directories[SMARTY_DIR])) {
            $smarty_dir = realpath(SMARTY_DIR);
            if ($smarty_dir !== false) {
                Smarty::$_muted_directories[SMARTY_DIR] =
                    array('file' => $smarty_dir, 'length' => strlen($smarty_dir),);
            }
        }

        // walk the muted directories and test against $errfile
        foreach (Smarty::$_muted_directories as $key => &$dir) {
            if (!$dir) {
                // resolve directory and length for speedy comparisons
                $file = realpath($key);
                if ($file === false) {
                    // this directory does not exist, remove and skip it
                    unset(Smarty::$_muted_directories[$key]);
                    continue;
                }
                $dir = array('file' => $file, 'length' => strlen($file),);
            }
            if (!strncmp($errfile, $dir['file'], $dir['length'])) {
                $_is_muted_directory = true;
                break;
            }
        }

        // pass to next error handler if this error did not occur inside SMARTY_DIR
        // or the error was within smarty but masked to be ignored
        if (!$_is_muted_directory || ($errno && $errno & error_reporting())) {
            if (Smarty::$_previous_error_handler) {
                return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline,
                                      $errcontext);
            } else {
                return false;
            }
        }
    }
Smarty::setAutoLiteral ( auto_literal)
Paramètres:
boolean$auto_literal

Références $auto_literal.

    {
        $this->auto_literal = $auto_literal;
    }
Smarty::setCacheDir ( cache_dir)

Set cache directory

Paramètres:
string$cache_dirdirectory to store cached templates in
Renvoie:
Smarty current Smarty instance for chaining

Références $_muted_directories, $cache_dir, et _realpath().

    {
        $this->cache_dir = $this->_realpath($cache_dir . DS, true);
        if (!isset(Smarty::$_muted_directories[$this->cache_dir])) {
            Smarty::$_muted_directories[$this->cache_dir] = null;
        }
        $this->_cache['cache_dir'] = true;
        return $this;
    }
Smarty::setCachingType ( caching_type)
Paramètres:
string$caching_type

Références $caching_type.

    {
        $this->caching_type = $caching_type;
    }
Smarty::setCompileCheck ( compile_check)
Paramètres:
boolean$compile_check

Références $compile_check.

    {
        $this->compile_check = $compile_check;
    }
Smarty::setCompileDir ( compile_dir)

Set compile directory

Paramètres:
string$compile_dirdirectory to store compiled templates in
Renvoie:
Smarty current Smarty instance for chaining

Références $_muted_directories, $compile_dir, et _realpath().

    {
        $this->compile_dir = $this->_realpath($compile_dir . DS, true);
        if (!isset(Smarty::$_muted_directories[$this->compile_dir])) {
            Smarty::$_muted_directories[$this->compile_dir] = null;
        }
        $this->_cache['compile_dir'] = true;
        return $this;
    }
Smarty::setCompileLocking ( compile_locking)
Paramètres:
boolean$compile_locking

Références $compile_locking.

    {
        $this->compile_locking = $compile_locking;
    }
Smarty::setConfigBooleanize ( config_booleanize)
Paramètres:
boolean$config_booleanize

Références $config_booleanize.

    {
        $this->config_booleanize = $config_booleanize;
    }
Smarty::setConfigDir ( config_dir)

Set config directory

Paramètres:
$config_dir
Renvoie:
Smarty current Smarty instance for chaining

Références $config_dir, et setTemplateDir().

    {
        return $this->setTemplateDir($config_dir, true);
    }
Smarty::setConfigOverwrite ( config_overwrite)
Paramètres:
boolean$config_overwrite

Références $config_overwrite.

    {
        $this->config_overwrite = $config_overwrite;
    }
Smarty::setConfigReadHidden ( config_read_hidden)
Paramètres:
boolean$config_read_hidden

Références $config_read_hidden.

    {
        $this->config_read_hidden = $config_read_hidden;
    }
Smarty::setDebugging ( debugging)
Paramètres:
boolean$debugging

Références $debugging.

    {
        $this->debugging = $debugging;
    }
Smarty::setDefaultResourceType ( default_resource_type)
Paramètres:
string$default_resource_type

Références $default_resource_type.

    {
        $this->default_resource_type = $default_resource_type;
    }
Smarty::setErrorReporting ( error_reporting)
Paramètres:
int$error_reporting

Références $error_reporting.

    {
        $this->error_reporting = $error_reporting;
    }
Smarty::setEscapeHtml ( escape_html)
Paramètres:
boolean$escape_html

Références $escape_html.

    {
        $this->escape_html = $escape_html;
    }
Smarty::setForceCompile ( force_compile)
Paramètres:
boolean$force_compile

Références $force_compile.

    {
        $this->force_compile = $force_compile;
    }
Smarty::setLeftDelimiter ( left_delimiter)
Paramètres:
string$left_delimiter

Références $left_delimiter.

    {
        $this->left_delimiter = $left_delimiter;
    }
Smarty::setMergeCompiledIncludes ( merge_compiled_includes)
Paramètres:
boolean$merge_compiled_includes

Références $merge_compiled_includes.

    {
        $this->merge_compiled_includes = $merge_compiled_includes;
    }
Smarty::setPluginsDir ( plugins_dir)

Set plugins directory

Paramètres:
string | array$plugins_dirdirectory(s) of plugins
Renvoie:
Smarty current Smarty instance for chaining

Références $plugins_dir.

    {
        $this->plugins_dir = (array) $plugins_dir;
        if (isset($this->_cache['plugins_dir'])) {
            unset($this->_cache['plugins_dir']);
        }
        return $this;
    }
Smarty::setRightDelimiter ( right_delimiter)
Paramètres:
string$right_delimiter

Références $right_delimiter.

    {
        $this->right_delimiter = $right_delimiter;
    }
Smarty::setTemplateDir ( template_dir,
isConfig = false 
)

Set template directory

Paramètres:
string | array$template_dirdirectory(s) of template sources
bool$isConfigtrue for config_dir
Renvoie:
current Smarty instance for chaining

Références $template_dir.

Référencé par setConfigDir().

    {
        $type = $isConfig ? 'config_dir' : 'template_dir';
        $joined = '_joined_' . $type;
        $this->{$type} = (array) $template_dir;
        $this->{$joined} = join(' # ', $this->{$type});
        $this->_cache[$type . '_new'] = true;
        $this->_cache[$type] = false;
        return $this;
    }
Smarty::setUseSubDirs ( use_sub_dirs)
Paramètres:
boolean$use_sub_dirs

Références $use_sub_dirs.

    {
        $this->use_sub_dirs = $use_sub_dirs;
    }
Smarty::templateExists ( resource_name)

Check if a template resource exists

Paramètres:
string$resource_nametemplate name
Renvoie:
boolean status

Référencé par SmartyBC\template_exists().

    {
        // create source object
        $source = Smarty_Template_Source::load(null, $this, $resource_name);
        return $source->exists;
    }
Smarty::testInstall ( &$  errors = null)

Test install

Paramètres:
null$errors
static Smarty::unmuteExpectedErrors ( ) [static]

Disable error handler muting expected messages

Renvoie:
void
    {
        restore_error_handler();
    }

Documentation des données membres

Smarty::$_CHARSET = SMARTY_RESOURCE_CHAR_SET [static]

The character set to adhere to (e.g. "UTF-8")

Référencé par __construct().

Smarty::$_current_file = null
Smarty::$_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT [static]

The date format to be used internally (accepts date() and strftime())

Smarty::$_debug = null
Smarty::$_IS_WINDOWS = false [static]

Flag denoting if operating system is windows

Référencé par __construct().

Smarty::$_joined_config_dir = null
Smarty::$_joined_template_dir = null
Smarty::$_MBSTRING = SMARTY_MBSTRING [static]

Flag denoting if Multibyte String functions are available

Smarty::$_muted_directories = array() [static]

contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()

Référencé par getCacheDir(), getCompileDir(), mutingErrorHandler(), setCacheDir(), et setCompileDir().

Smarty::$_objType = 1
Smarty::$_parserdebug = false
Smarty::$_previous_error_handler = null [static]

error handler returned by set_error_handler() in Smarty::muteExpectedErrors()

Référencé par muteExpectedErrors(), et mutingErrorHandler().

Smarty::$_UTF8_MODIFIER = 'u' [static]

Flag denoting if PCRE should run in UTF-8 mode

Référencé par __construct().

Smarty::$accessMap [static, private]
Valeur initiale :
 array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir',
                                      'plugins_dir'  => 'PluginsDir', 'compile_dir' => 'CompileDir',
                                      'cache_dir'    => 'CacheDir',)
Smarty::$allow_ambiguous_resources = false
Smarty::$allow_php_templates = false
Smarty::$auto_literal = true

Référencé par setAutoLiteral().

Smarty::$autoload_filters = array()
Smarty::$cache_dir = './cache/' [private]

Référencé par setCacheDir().

Smarty::$cache_locking = false
Smarty::$cache_modified_check = false
Smarty::$caching_type = 'file'

Référencé par setCachingType().

Smarty::$compile_check = true

Référencé par setCompileCheck().

Smarty::$compile_dir = './templates_c/' [private]

Référencé par setCompileDir().

Smarty::$compile_locking = true

Référencé par setCompileLocking().

Smarty::$config_booleanize = true

Référencé par setConfigBooleanize().

Smarty::$config_dir = array('./configs/') [private]

Référencé par addConfigDir(), et setConfigDir().

Smarty::$config_overwrite = true

Référencé par setConfigOverwrite().

Smarty::$config_read_hidden = false

Référencé par setConfigReadHidden().

Smarty::$debug_tpl = null
Smarty::$debugging = false

Référencé par setDebugging().

Smarty::$debugging_ctrl = 'NONE'
Smarty::$default_config_handler_func = null
Smarty::$default_config_type = 'file'
Smarty::$default_modifiers = array()
Smarty::$default_plugin_handler_func = null
Smarty::$default_resource_type = 'file'

Référencé par setDefaultResourceType().

Smarty::$default_template_handler_func = null
Smarty::$error_reporting = null

Référencé par setErrorReporting().

Smarty::$error_unassigned = false
Smarty::$escape_html = false

Référencé par setEscapeHtml().

Smarty::$force_cache = false
Smarty::$force_compile = false

Référencé par setForceCompile().

Smarty::$global_tpl_vars = array() [static]

#@- assigned global tpl vars

Référencé par __construct().

Smarty::$left_delimiter = "{"

Référencé par setLeftDelimiter().

Smarty::$locking_timeout = 10
Smarty::$merge_compiled_includes = false

Référencé par setMergeCompiledIncludes().

Smarty::$obsoleteProperties [static, private]
Valeur initiale :
 array('resource_caching', 'template_resource_caching',
                                               'direct_access_security', '_dir_perms', '_file_perms',
                                               'plugin_search_order', 'inheritance_merge_compiled_includes')
Smarty::$php_handling = self::PHP_PASSTHRU
Smarty::$plugins_dir = null [private]
Smarty::$registered_cache_resources = array()
Smarty::$registered_classes = array()
Smarty::$registered_filters = array()
Smarty::$registered_objects = array()
Smarty::$registered_plugins = array()
Smarty::$registered_resources = array()
Smarty::$resource_cache_mode = 1
Smarty::$right_delimiter = "}"

Référencé par setRightDelimiter().

Smarty::$security_class = 'Smarty_Security'

Référencé par enableSecurity().

Smarty::$security_policy = null
Smarty::$smarty_debug_id = 'SMARTY_DEBUG'
Smarty::$start_time = 0
Smarty::$template_dir = array('./templates/') [private]

Référencé par addTemplateDir(), et setTemplateDir().

Smarty::$use_include_path = false
Smarty::$use_sub_dirs = false

Référencé par setUseSubDirs().

define caching modes

const Smarty::CLEAR_EXPIRED = - 1

define constant for clearing cache files be saved expiration dates

define compile check modes

const Smarty::DEBUG_OFF = 0

define debug modes

const Smarty::DEBUG_ON = 1
const Smarty::FILTER_OUTPUT = 'output'
const Smarty::FILTER_POST = 'post'

filter types

const Smarty::FILTER_PRE = 'pre'
const Smarty::FILTER_VARIABLE = 'variable'
const Smarty::PHP_ALLOW = 3

modes for handling of "<?php ... ?>" tags in templates.

const Smarty::PHP_QUOTE = 1
const Smarty::PHP_REMOVE = 2
const Smarty::PLUGIN_BLOCK = 'block'
const Smarty::PLUGIN_COMPILER = 'compiler'
const Smarty::PLUGIN_FUNCTION = 'function'

plugin types

const Smarty::PLUGIN_MODIFIER = 'modifier'
const Smarty::PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'

Resource caching modes

define variable scopes

const Smarty::SCOPE_ROOT = 8
const Smarty::SMARTY_VERSION = '3.1.29'

#@+ constant definitions smarty version


La documentation de cette classe a été générée à partir du fichier suivant :
 Tout Classes Fichiers Fonctions Variables Définitions de type Macros