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

ServiceReferenceGraphNode.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 2.45 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\Definition;
 015  use Symfony\Component\DependencyInjection\Alias;
 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 = array();
 028      private $outEdges = array();
 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      /**
 042       * Adds an in edge to this node.
 043       *
 044       * @param ServiceReferenceGraphEdge $edge
 045       */
 046      public function addInEdge(ServiceReferenceGraphEdge $edge)
 047      {
 048          $this->inEdges[] = $edge;
 049      }
 050   
 051      /**
 052       * Adds an out edge to this node.
 053       *
 054       * @param ServiceReferenceGraphEdge $edge
 055       */
 056      public function addOutEdge(ServiceReferenceGraphEdge $edge)
 057      {
 058          $this->outEdges[] = $edge;
 059      }
 060   
 061      /**
 062       * Checks if the value of this node is an Alias.
 063       *
 064       * @return bool True if the value is an Alias instance
 065       */
 066      public function isAlias()
 067      {
 068          return $this->value instanceof Alias;
 069      }
 070   
 071      /**
 072       * Checks if the value of this node is a Definition.
 073       *
 074       * @return bool True if the value is a Definition instance
 075       */
 076      public function isDefinition()
 077      {
 078          return $this->value instanceof Definition;
 079      }
 080   
 081      /**
 082       * Returns the identifier.
 083       *
 084       * @return string
 085       */
 086      public function getId()
 087      {
 088          return $this->id;
 089      }
 090   
 091      /**
 092       * Returns the in edges.
 093       *
 094       * @return array The in ServiceReferenceGraphEdge array
 095       */
 096      public function getInEdges()
 097      {
 098          return $this->inEdges;
 099      }
 100   
 101      /**
 102       * Returns the out edges.
 103       *
 104       * @return array The out ServiceReferenceGraphEdge array
 105       */
 106      public function getOutEdges()
 107      {
 108          return $this->outEdges;
 109      }
 110   
 111      /**
 112       * Returns the value of this Node.
 113       *
 114       * @return mixed The value
 115       */
 116      public function getValue()
 117      {
 118          return $this->value;
 119      }
 120  }
 121