$61 GRAYBYTE WORDPRESS FILE MANAGER $61

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php54/usr/share/pear/Symfony/Bridge/Twig/Extension/

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Bridge/Twig/Extension//YamlExtension.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Bridge\Twig\Extension;

use Symfony\Component\Yaml\Dumper as YamlDumper;

/**
 * Provides integration of the Yaml component with Twig.
 *
 * @author Fabien Potencier <[email protected]>
 */
class YamlExtension extends \Twig_Extension
{
    /**
     * {@inheritdoc}
     */
    public function getFilters()
    {
        return array(
            new \Twig_SimpleFilter('yaml_encode', array($this, 'encode')),
            new \Twig_SimpleFilter('yaml_dump', array($this, 'dump')),
        );
    }

    public function encode($input, $inline = 0, $dumpObjects = false)
    {
        static $dumper;

        if (null === $dumper) {
            $dumper = new YamlDumper();
        }

        return $dumper->dump($input, $inline, false, $dumpObjects);
    }

    public function dump($value, $inline = 0, $dumpObjects = false)
    {
        if (is_resource($value)) {
            return '%Resource%';
        }

        if (is_array($value) || is_object($value)) {
            return '%'.gettype($value).'% '.$this->encode($value, $inline, $dumpObjects);
        }

        return $this->encode($value, $inline, $dumpObjects);
    }

    /**
     * Returns the name of the extension.
     *
     * @return string The extension name
     */
    public function getName()
    {
        return 'yaml';
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
CodeExtension.php
7.925 KB
18 Dec 2019 11.22 AM
root / root
0644
ExpressionExtension.php
0.986 KB
18 Dec 2019 11.22 AM
root / root
0644
FormExtension.php
4.573 KB
18 Dec 2019 11.22 AM
root / root
0644
HttpKernelExtension.php
2.595 KB
18 Dec 2019 11.22 AM
root / root
0644
RoutingExtension.php
3.545 KB
18 Dec 2019 11.22 AM
root / root
0644
SecurityExtension.php
1.358 KB
18 Dec 2019 11.22 AM
root / root
0644
StopwatchExtension.php
1.106 KB
18 Dec 2019 11.22 AM
root / root
0644
TranslationExtension.php
3.245 KB
18 Dec 2019 11.22 AM
root / root
0644
YamlExtension.php
1.525 KB
18 Dec 2019 11.22 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF