Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

SimpleXMLElement.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 3.52 KiB


001  <?php
002   
003  /*
004   * This file is part of the Symfony package.
005   *
006   * (c) Fabien Potencier <fabien@symfony.com>
007   *
008   * For the full copyright and license information, please view the LICENSE
009   * file that was distributed with this source code.
010   */
011   
012  namespace Symfony\Component\DependencyInjection;
013   
014  @trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
015   
016  use Symfony\Component\Config\Util\XmlUtils;
017  use Symfony\Component\ExpressionLanguage\Expression;
018   
019  /**
020   * SimpleXMLElement class.
021   *
022   * @author Fabien Potencier <fabien@symfony.com>
023   *
024   * @deprecated since version 2.5, to be removed in 3.0.
025   */
026  class SimpleXMLElement extends \SimpleXMLElement
027  {
028      /**
029       * Converts an attribute as a PHP type.
030       *
031       * @param string $name
032       *
033       * @return mixed
034       */
035      public function getAttributeAsPhp($name)
036      {
037          return self::phpize($this[$name]);
038      }
039   
040      /**
041       * Returns arguments as valid PHP types.
042       *
043       * @param string $name
044       * @param bool   $lowercase
045       *
046       * @return mixed
047       */
048      public function getArgumentsAsPhp($name, $lowercase = true)
049      {
050          $arguments = array();
051          foreach ($this->$name as $arg) {
052              if (isset($arg['name'])) {
053                  $arg['key'] = (string) $arg['name'];
054              }
055              $key = isset($arg['key']) ? (string) $arg['key'] : (!$arguments ? 0 : max(array_keys($arguments)) + 1);
056   
057              // parameter keys are case insensitive
058              if ('parameter' == $name && $lowercase) {
059                  $key = strtolower($key);
060              }
061   
062              // this is used by DefinitionDecorator to overwrite a specific
063              // argument of the parent definition
064              if (isset($arg['index'])) {
065                  $key = 'index_'.$arg['index'];
066              }
067   
068              switch ($arg['type']) {
069                  case 'service':
070                      $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
071                      if (isset($arg['on-invalid']) && 'ignore' == $arg['on-invalid']) {
072                          $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
073                      } elseif (isset($arg['on-invalid']) && 'null' == $arg['on-invalid']) {
074                          $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
075                      }
076   
077                      if (isset($arg['strict'])) {
078                          $strict = self::phpize($arg['strict']);
079                      } else {
080                          $strict = true;
081                      }
082   
083                      $arguments[$key] = new Reference((string) $arg['id'], $invalidBehavior, $strict);
084                      break;
085                  case 'expression':
086                      $arguments[$key] = new Expression((string) $arg);
087                      break;
088                  case 'collection':
089                      $arguments[$key] = $arg->getArgumentsAsPhp($name, false);
090                      break;
091                  case 'string':
092                      $arguments[$key] = (string) $arg;
093                      break;
094                  case 'constant':
095                      $arguments[$key] = constant((string) $arg);
096                      break;
097                  default:
098                      $arguments[$key] = self::phpize($arg);
099              }
100          }
101   
102          return $arguments;
103      }
104   
105      /**
106       * Converts an xml value to a PHP type.
107       *
108       * @param mixed $value
109       *
110       * @return mixed
111       */
112      public static function phpize($value)
113      {
114          return XmlUtils::phpize($value);
115      }
116  }
117