Método que añade una nueva ruta al path de Twig
@param $path
@param $domain

@return Template
976116
public function addPath($path, $domain = '')
    {
        $this->tpl->getLoader()->addPath($path, $domain);
        return $this;
    }
799512
public function addPreinitDomain($domain) {
		$domain = (string) $domain;
		
		if (in_array($domain, $this->preinitDomains, true)) {
			return $this;
		}
		
		$this->preinitDomains[] = $domain;
		$this->preinitNeed      = true;
		
		return $this;
	}
871258
public function addDomain($domain)
    {
        if (!isset($this->domains[$domain])) {
            $this->domains[$domain] = $domain;
        }

        return $this;
    }
1336781
protected function compileAndSaveTemplate(string $content, string $path, string $class): TemplateInterface
    {
        if (isset($this->cache[$class])) {
            return $this->cache[$class];
        }

        if (!class_exists($class, false)) {
            $target = $this->resolveCacheTemplatePath($class);

            if ($this->isNeedRecompile($target, $path)) {
                $compiledTemplate = $this
                    ->createCompiler($content, $target, $class)
                    ->compile();

                file_put_contents($target, $compiledTemplate);
            }

            require_once $target;
        }

        return $this->cache[$class] = new $class(
            $this,
            $this->getHelpers(),
            $this->variableProviders
        );
    }
803893
protected function getPathAndDomain( $path, $domain, $secure = false )
	{
		return [$path ?: $this->path, $domain ?: $this->domain, $secure ?: $this->secure];
	}
1061660
public function addTextDomain($domain, $path): void
    {
        // check path
        if (!is_dir($path)) {
            throw new ConfigurationException("Translator configuration path `$path` not found");
        }

        bindtextdomain($domain, $path);

        // @todo: hardcoded codeset
        bind_textdomain_codeset($domain, 'UTF-8');
    }
1125693
protected function convertTwigToPhp($path, $name)
    {
        $results = array();

        $dir = dirname($path);

        if (!file_exists($dir)) {
            mkdir($dir, 0755, true);
        }

        $templates = array();
        if ( $name === 'app' ) {
            $templates = $this->findFilesInFolder($dir . '/../../', 'twig');
        } else {
            $templates = $this->findFilesInFolder($dir . '/../views', 'twig');
        }

        $php  = "<?php\n";
        $twig = $this->getContainer()->get('twig');
        $twig->setLoader(new \Twig_Loader_String());
        foreach ($templates as $templateFileName) {
            $stream = $twig->tokenize(file_get_contents($templateFileName));
            $nodes = $twig->parse($stream);
            $template = $twig->compile($nodes);
            // remove first line
            $template = substr($template, strpos($template, "\n")+strlen("\n"));
            $php .= "/*\n * Resource: $name\n * File: $templateFileName\n */\n";
            $php .= $template;
            $results[$templateFileName]='Scanned';
        }

        if (!file_put_contents($path, $php)) {
            throw new \Exception('Cannot write intermediate PHP code for twig templates to twig.cache.php in: '.$path);
        }

        return $results;
    }
955031
public function addResourcePaths($domain, array $paths) {
        foreach ($paths as $path) {
            $this->_paths[$domain][] = $path;
        }

        return $this;
    }
344496
public function addDomain($domain, $path='./locale/')
    {
        bindtextdomain($domain, $path);
        if ($this->_encoding) {
            bind_textdomain_codeset($domain, $this->_encoding);
        }
        $this->useDomain($domain);
    }
813406
public function removeCookie($name, $path = '/', $domain = null)
    {
        if (null === $path) {
            $path = '/';
        }

        unset($this->cookies[$domain][$path][$name]);

        if (empty($this->cookies[$domain][$path])) {
            unset($this->cookies[$domain][$path]);

            if (empty($this->cookies[$domain])) {
                unset($this->cookies[$domain]);
            }
        }

        if (empty($this->cookies)) {
            unset($this->headerNames['set-cookie']);
        }
    }
857989
public function getRoute($path, $domain = null, $scheme = null)
    {
        $uri = ($scheme ?? $this->scheme) . '://' . ($domain ?? $this->domain) . $path;

        return $this->find($uri);
    }
1203013
public function loadTemplate($path)
    {
        $tpl = new Template();

        $tpl->injectVariables($this->getVariables());
        $tpl->setViewName($path);
        $tpl->setConfig("allow_debug", $this->getConfig("allow_debug"));
        $tpl->setConfig("layout", $this->getConfig("layout"));

        return $tpl->compile();
    }
1252124
public function addDomain(Domain $domain)
    {
        if ($this->domains->contains($domain)) {
            return $this;
        }

        $this->domains[] = $domain;

        return $this;
    }
1356296
public function domain($domain = null) {

		if(null !== $domain) {

			if(false === is_string($domain)) {
				return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($domain)), E_USER_ERROR);
			}

			//Check if identifier exists
			if(false === Router :: routeExists($this -> identifier, $domain)) {
				return trigger_error(sprintf('Identifier "%s" with domain "%s" does not exists', $this -> identifier, $domain), E_USER_ERROR);	
			}

			$this -> domain = $domain;
		}

		return $this;
	}
1321190
public function forget($name, $path = null, $domain = null)
    {
        return $this->make($name, null, -2628000, $path, $domain);
    }
593304
public function removeCookie($name, $path = '/', $domain = NULL) {

        if ($path === NULL) {
            $path = '/';
        }

        unset($this->cookies[$domain][$path][$name]);

        if (empty($this->cookies[$domain][$path])) {
            unset($this->cookies[$domain][$path]);

            if (empty($this->cookies[$domain])) {
                unset($this->cookies[$domain]);
            }
        }

    }
62987
public function getTwigTemplate($content = array(), $template = null, $directory = null)
        {
            if ($template && $directory) {
                $loader = new Twig_Loader_Filesystem($directory);
            } else {
                $loader   = new Twig_Loader_Filesystem(__DIR__ . "/../../views");
                $template = 'email.twig';
            }
            $twig = new Twig_Environment($loader);

            return $twig->render($template, array(
                'email_title' => $this->email_title,
                'body_color'  => $this->body_color,
                'table_color' => $this->table_color,
                'content'     => $content
            ));
        }