PHP 8.2.30
Preview: TemplateNameParser.php Size: 988 B
//opt/cloudlinux/alt-php55/root/usr/share/pear/Symfony/Component/Templating/TemplateNameParser.php

<?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);
    }
}

Directory Contents

Dirs: 4 × Files: 10

Name Size Perms Modified Actions
Asset DIR
- drwxr-xr-x 2024-03-03 22:54:39
Edit Download
Helper DIR
- drwxr-xr-x 2024-03-03 22:54:39
Edit Download
Loader DIR
- drwxr-xr-x 2024-03-03 22:54:39
Edit Download
Storage DIR
- drwxr-xr-x 2024-03-03 22:54:39
Edit Download
340 B lrw-r--r-- 2019-12-18 11:24:07
Edit Download
694 B lrw-r--r-- 2019-12-18 11:24:07
Edit Download
2.77 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
2.18 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
15.37 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.00 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
988 B lrw-r--r-- 2019-12-18 11:24:07
Edit Download
811 B lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.87 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download
1.93 KB lrw-r--r-- 2019-12-18 11:24:07
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).