Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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

ServiceReferenceGraphNode.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 2.33 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\Compiler;
013   
014  use Symfony\Component\DependencyInjection\Alias;
015  use Symfony\Component\DependencyInjection\Definition;
016   
017  /**
018   * Represents a node in your service graph.
019   *
020   * Value is typically a definition, or an alias.
021   *
022   * @author Johannes M. Schmitt <schmittjoh@gmail.com>
023   */
024  class ServiceReferenceGraphNode
025  {
026      private $id;
027      private $inEdges = [];
028      private $outEdges = [];
029      private $value;
030   
031      /**
032       * @param string $id    The node identifier
033       * @param mixed  $value The node value
034       */
035      public function __construct($id, $value)
036      {
037          $this->id = $id;
038          $this->value = $value;
039      }
040   
041      public function addInEdge(ServiceReferenceGraphEdge $edge)
042      {
043          $this->inEdges[] = $edge;
044      }
045   
046      public function addOutEdge(ServiceReferenceGraphEdge $edge)
047      {
048          $this->outEdges[] = $edge;
049      }
050   
051      /**
052       * Checks if the value of this node is an Alias.
053       *
054       * @return bool True if the value is an Alias instance
055       */
056      public function isAlias()
057      {
058          return $this->value instanceof Alias;
059      }
060   
061      /**
062       * Checks if the value of this node is a Definition.
063       *
064       * @return bool True if the value is a Definition instance
065       */
066      public function isDefinition()
067      {
068          return $this->value instanceof Definition;
069      }
070   
071      /**
072       * Returns the identifier.
073       *
074       * @return string
075       */
076      public function getId()
077      {
078          return $this->id;
079      }
080   
081      /**
082       * Returns the in edges.
083       *
084       * @return ServiceReferenceGraphEdge[]
085       */
086      public function getInEdges()
087      {
088          return $this->inEdges;
089      }
090   
091      /**
092       * Returns the out edges.
093       *
094       * @return ServiceReferenceGraphEdge[]
095       */
096      public function getOutEdges()
097      {
098          return $this->outEdges;
099      }
100   
101      /**
102       * Returns the value of this Node.
103       *
104       * @return mixed The value
105       */
106      public function getValue()
107      {
108          return $this->value;
109      }
110   
111      /**
112       * Clears all edges.
113       */
114      public function clear()
115      {
116          $this->inEdges = $this->outEdges = [];
117      }
118  }
119