$72 GRAYBYTE WORDPRESS FILE MANAGER $15

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php54/usr/share/pear/Symfony/Component/DependencyInjection/

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/DependencyInjection//SimpleXMLElement.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\DependencyInjection;

use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\ExpressionLanguage\Expression;

/**
 * SimpleXMLElement class.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class SimpleXMLElement extends \SimpleXMLElement
{
    /**
     * Converts an attribute as a PHP type.
     *
     * @param string $name
     *
     * @return mixed
     */
    public function getAttributeAsPhp($name)
    {
        return self::phpize($this[$name]);
    }

    /**
     * Returns arguments as valid PHP types.
     *
     * @param string  $name
     * @param Boolean $lowercase
     *
     * @return mixed
     */
    public function getArgumentsAsPhp($name, $lowercase = true)
    {
        $arguments = array();
        foreach ($this->$name as $arg) {
            if (isset($arg['name'])) {
                $arg['key'] = (string) $arg['name'];
            }
            $key = isset($arg['key']) ? (string) $arg['key'] : (!$arguments ? 0 : max(array_keys($arguments)) + 1);

            // parameter keys are case insensitive
            if ('parameter' == $name && $lowercase) {
                $key = strtolower($key);
            }

            // this is used by DefinitionDecorator to overwrite a specific
            // argument of the parent definition
            if (isset($arg['index'])) {
                $key = 'index_'.$arg['index'];
            }

            switch ($arg['type']) {
                case 'service':
                    $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
                    if (isset($arg['on-invalid']) && 'ignore' == $arg['on-invalid']) {
                        $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
                    } elseif (isset($arg['on-invalid']) && 'null' == $arg['on-invalid']) {
                        $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
                    }

                    if (isset($arg['strict'])) {
                        $strict = self::phpize($arg['strict']);
                    } else {
                        $strict = true;
                    }

                    $arguments[$key] = new Reference((string) $arg['id'], $invalidBehavior, $strict);
                    break;
                case 'expression':
                    $arguments[$key] = new Expression((string) $arg);
                    break;
                case 'collection':
                    $arguments[$key] = $arg->getArgumentsAsPhp($name, false);
                    break;
                case 'string':
                    $arguments[$key] = (string) $arg;
                    break;
                case 'constant':
                    $arguments[$key] = constant((string) $arg);
                    break;
                default:
                    $arguments[$key] = self::phpize($arg);
            }
        }

        return $arguments;
    }

    /**
     * Converts an xml value to a PHP type.
     *
     * @param mixed $value
     *
     * @return mixed
     */
    public static function phpize($value)
    {
        return XmlUtils::phpize($value);
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 7.05 AM
root / root
0755
Compiler
--
31 Aug 2024 7.05 AM
root / root
0755
Dumper
--
31 Aug 2024 7.05 AM
root / root
0755
Exception
--
31 Aug 2024 7.05 AM
root / root
0755
Extension
--
31 Aug 2024 7.05 AM
root / root
0755
LazyProxy
--
31 Aug 2024 7.05 AM
root / root
0755
Loader
--
31 Aug 2024 7.05 AM
root / root
0755
ParameterBag
--
31 Aug 2024 7.05 AM
root / root
0755
Alias.php
1.246 KB
18 Dec 2019 6.22 PM
root / root
0644
Container.php
16.567 KB
18 Dec 2019 6.22 PM
root / root
0644
ContainerAware.php
0.853 KB
18 Dec 2019 6.22 PM
root / root
0644
ContainerAwareInterface.php
0.697 KB
18 Dec 2019 6.22 PM
root / root
0644
ContainerAwareTrait.php
0.737 KB
18 Dec 2019 6.22 PM
root / root
0644
ContainerBuilder.php
32.63 KB
18 Dec 2019 6.22 PM
root / root
0644
ContainerInterface.php
3.768 KB
18 Dec 2019 6.22 PM
root / root
0644
Definition.php
14.305 KB
18 Dec 2019 6.22 PM
root / root
0644
DefinitionDecorator.php
4.578 KB
18 Dec 2019 6.22 PM
root / root
0644
ExpressionLanguage.php
1.187 KB
18 Dec 2019 6.22 PM
root / root
0644
IntrospectableContainerInterface.php
0.814 KB
18 Dec 2019 6.22 PM
root / root
0644
Parameter.php
0.749 KB
18 Dec 2019 6.22 PM
root / root
0644
Reference.php
1.543 KB
18 Dec 2019 6.22 PM
root / root
0644
Scope.php
0.856 KB
18 Dec 2019 6.22 PM
root / root
0644
ScopeInterface.php
0.525 KB
18 Dec 2019 6.22 PM
root / root
0644
SimpleXMLElement.php
3.321 KB
18 Dec 2019 6.22 PM
root / root
0644
TaggedContainerInterface.php
0.731 KB
18 Dec 2019 6.22 PM
root / root
0644
Variable.php
0.804 KB
18 Dec 2019 6.22 PM
root / root
0644
autoloader.php
0.341 KB
18 Dec 2019 6.22 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF