Ejemplo n.º 1
0
 /**
  * PathsAnswer constructor.
  * @param NodeEntity $from
  * @param NodeEntity $to
  * @param PathEntity[] $pathEntities
  */
 public function __construct(NodeEntity $from, NodeEntity $to, array $pathEntities)
 {
     parent::__construct($from, $to);
     $this->pathEntities = $pathEntities;
     $this->paths = $this->processPaths($pathEntities);
 }
Ejemplo n.º 2
0
 /**
  * PathsAnswer constructor.
  * @param NodeEntity $from
  * @param NodeEntity $to
  * @param PathEntity $pathEntity
  */
 public function __construct(NodeEntity $from, NodeEntity $to, PathEntity $pathEntity = null)
 {
     parent::__construct($from, $to);
     $this->pathEntity = $pathEntity;
     $this->path = $pathEntity ? $pathEntity->getPath()->getData() : false;
 }