renamed indice to index

This commit is contained in:
Fabien Potencier
2012-04-23 20:32:33 +02:00
parent fafde80874
commit fb07f3a99c
2 changed files with 10 additions and 10 deletions
+8 -8
View File
@@ -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];
+2 -2
View File
@@ -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);
}
/**