mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
renamed indice to index
This commit is contained in:
@@ -251,14 +251,14 @@ class Twig_Environment
|
||||
/**
|
||||
* Gets the template class associated with the given string.
|
||||
*
|
||||
* @param string $name The name for which to calculate the template class name
|
||||
* @param integer $indice The indice for inline templates (null for main templates)
|
||||
* @param string $name The name for which to calculate the template class name
|
||||
* @param integer $index The index for inline templates (null for main templates)
|
||||
*
|
||||
* @return string The template class name
|
||||
*/
|
||||
public function getTemplateClass($name, $indice = null)
|
||||
public function getTemplateClass($name, $index = null)
|
||||
{
|
||||
return $this->templateClassPrefix.md5($this->loader->getCacheKey($name)).(null === $indice ? '' : '_'.$indice);
|
||||
return $this->templateClassPrefix.md5($this->loader->getCacheKey($name)).(null === $index ? '' : '_'.$index);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,14 +298,14 @@ class Twig_Environment
|
||||
/**
|
||||
* Loads a template by name.
|
||||
*
|
||||
* @param string $name The template name
|
||||
* @param integer $indice The indice for inline templates (null for main templates)
|
||||
* @param string $name The template name
|
||||
* @param integer $index The index for inline templates (null for main templates)
|
||||
*
|
||||
* @return Twig_TemplateInterface A template instance representing the given template name
|
||||
*/
|
||||
public function loadTemplate($name, $indice = null)
|
||||
public function loadTemplate($name, $index = null)
|
||||
{
|
||||
$cls = $this->getTemplateClass($name, $indice);
|
||||
$cls = $this->getTemplateClass($name, $index);
|
||||
|
||||
if (isset($this->loadedTemplates[$cls])) {
|
||||
return $this->loadedTemplates[$cls];
|
||||
|
||||
@@ -23,9 +23,9 @@ class Twig_Node_Module extends Twig_Node
|
||||
parent::__construct(array('parent' => $parent, 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, 'traits' => $traits, 'inlined_templates' => $inlinedTemplates), array('filename' => $filename, 'inline' => null), 1);
|
||||
}
|
||||
|
||||
public function setInline($indice)
|
||||
public function setInline($index)
|
||||
{
|
||||
$this->setAttribute('inline', $indice);
|
||||
$this->setAttribute('inline', $index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user