Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ServiceReferenceGraphNode.php
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;
028 private $outEdges;
029 private $value;
030
031 /**
032 * Constructor.
033 *
034 * @param string $id The node identifier
035 * @param mixed $value The node value
036 */
037 public function __construct($id, $value)
038 {
039 $this->id = $id;
040 $this->value = $value;
041 $this->inEdges = array();
042 $this->outEdges = array();
043 }
044
045 /**
046 * Adds an in edge to this node.
047 *
048 * @param ServiceReferenceGraphEdge $edge
049 */
050 public function addInEdge(ServiceReferenceGraphEdge $edge)
051 {
052 $this->inEdges[] = $edge;
053 }
054
055 /**
056 * Adds an out edge to this node.
057 *
058 * @param ServiceReferenceGraphEdge $edge
059 */
060 public function addOutEdge(ServiceReferenceGraphEdge $edge)
061 {
062 $this->outEdges[] = $edge;
063 }
064
065 /**
066 * Checks if the value of this node is an Alias.
067 *
068 * @return bool True if the value is an Alias instance
069 */
070 public function isAlias()
071 {
072 return $this->value instanceof Alias;
073 }
074
075 /**
076 * Checks if the value of this node is a Definition.
077 *
078 * @return bool True if the value is a Definition instance
079 */
080 public function isDefinition()
081 {
082 return $this->value instanceof Definition;
083 }
084
085 /**
086 * Returns the identifier.
087 *
088 * @return string
089 */
090 public function getId()
091 {
092 return $this->id;
093 }
094
095 /**
096 * Returns the in edges.
097 *
098 * @return array The in ServiceReferenceGraphEdge array
099 */
100 public function getInEdges()
101 {
102 return $this->inEdges;
103 }
104
105 /**
106 * Returns the out edges.
107 *
108 * @return array The out ServiceReferenceGraphEdge array
109 */
110 public function getOutEdges()
111 {
112 return $this->outEdges;
113 }
114
115 /**
116 * Returns the value of this Node
117 *
118 * @return mixed The value
119 */
120 public function getValue()
121 {
122 return $this->value;
123 }
124 }
125