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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ServiceReferenceGraphEdge.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 /**
015 * Represents an edge in your service graph.
016 *
017 * Value is typically a reference.
018 *
019 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
020 */
021 class ServiceReferenceGraphEdge
022 {
023 private $sourceNode;
024 private $destNode;
025 private $value;
026 private $lazy;
027 private $weak;
028 private $byConstructor;
029
030 /**
031 * @param mixed $value
032 * @param bool $lazy
033 * @param bool $weak
034 * @param bool $byConstructor
035 */
036 public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false, $byConstructor = false)
037 {
038 $this->sourceNode = $sourceNode;
039 $this->destNode = $destNode;
040 $this->value = $value;
041 $this->lazy = $lazy;
042 $this->weak = $weak;
043 $this->byConstructor = $byConstructor;
044 }
045
046 /**
047 * Returns the value of the edge.
048 *
049 * @return string
050 */
051 public function getValue()
052 {
053 return $this->value;
054 }
055
056 /**
057 * Returns the source node.
058 *
059 * @return ServiceReferenceGraphNode
060 */
061 public function getSourceNode()
062 {
063 return $this->sourceNode;
064 }
065
066 /**
067 * Returns the destination node.
068 *
069 * @return ServiceReferenceGraphNode
070 */
071 public function getDestNode()
072 {
073 return $this->destNode;
074 }
075
076 /**
077 * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
078 *
079 * @return bool
080 */
081 public function isLazy()
082 {
083 return $this->lazy;
084 }
085
086 /**
087 * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
088 *
089 * @return bool
090 */
091 public function isWeak()
092 {
093 return $this->weak;
094 }
095
096 /**
097 * Returns true if the edge links with a constructor argument.
098 *
099 * @return bool
100 */
101 public function isReferencedByConstructor()
102 {
103 return $this->byConstructor;
104 }
105 }
106