Server IP : 162.0.209.157 / Your IP : 18.226.98.244 [ Web Server : LiteSpeed System : Linux premium178.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : balaoqob ( 2395) PHP Version : 8.0.30 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/php54/usr/share/pear/Symfony/Component/Templating/ |
Upload File : |
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Templating; /** * TemplateNameParser is the default implementation of TemplateNameParserInterface. * * This implementation takes everything as the template name * and the extension for the engine. * * @author Fabien Potencier <fabien@symfony.com> * * @api */ class TemplateNameParser implements TemplateNameParserInterface { /** * {@inheritdoc} * * @api */ public function parse($name) { if ($name instanceof TemplateReferenceInterface) { return $name; } $engine = null; if (false !== $pos = strrpos($name, '.')) { $engine = substr($name, $pos + 1); } return new TemplateReference($name, $engine); } }