projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website]
/
vendor
/
symfony
/
dependency-injection
/
Compiler
/
ServiceReferenceGraph.php
diff --git
a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
index e7306ab560e2204a4a7718ecc8c38a2d3adb07bc..4d36ae7678f1545c0efd0e59a42348483fa27b77 100644
(file)
--- a/
vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
+++ b/
vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
@@
-20,6
+20,8
@@
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
* it themselves which improves performance quite a lot.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
* it themselves which improves performance quite a lot.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ *
+ * @final since version 3.4
*/
class ServiceReferenceGraph
{
*/
class ServiceReferenceGraph
{
@@
-73,6
+75,9
@@
class ServiceReferenceGraph
*/
public function clear()
{
*/
public function clear()
{
+ foreach ($this->nodes as $node) {
+ $node->clear();
+ }
$this->nodes = array();
}
$this->nodes = array();
}
@@
-80,16
+85,25
@@
class ServiceReferenceGraph
* Connects 2 nodes together in the Graph.
*
* @param string $sourceId
* Connects 2 nodes together in the Graph.
*
* @param string $sourceId
- * @param
string
$sourceValue
+ * @param
mixed
$sourceValue
* @param string $destId
* @param string $destId
- * @param
string
$destValue
+ * @param
mixed
$destValue
* @param string $reference
* @param string $reference
+ * @param bool $lazy
+ * @param bool $weak
*/
*/
- public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null)
+ public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null
/*, bool $lazy = false, bool $weak = false*/
)
{
{
+ $lazy = \func_num_args() >= 6 ? func_get_arg(5) : false;
+ $weak = \func_num_args() >= 7 ? func_get_arg(6) : false;
+
+ if (null === $sourceId || null === $destId) {
+ return;
+ }
+
$sourceNode = $this->createNode($sourceId, $sourceValue);
$destNode = $this->createNode($destId, $destValue);
$sourceNode = $this->createNode($sourceId, $sourceValue);
$destNode = $this->createNode($destId, $destValue);
- $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference);
+ $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference
, $lazy, $weak
);
$sourceNode->addOutEdge($edge);
$destNode->addInEdge($edge);
$sourceNode->addOutEdge($edge);
$destNode->addInEdge($edge);
@@
-99,7
+113,7
@@
class ServiceReferenceGraph
* Creates a graph node.
*
* @param string $id
* Creates a graph node.
*
* @param string $id
- * @param
string
$value
+ * @param
mixed
$value
*
* @return ServiceReferenceGraphNode
*/
*
* @return ServiceReferenceGraphNode
*/