Exemple #1
0
 protected function getVerticesAdjacent(Vertex $vertex)
 {
     if ($this->direction === self::DIRECTION_FORWARD) {
         return $vertex->getVerticesEdgeTo();
     } elseif ($this->direction === self::DIRECTION_REVERSE) {
         return $vertex->getVerticesEdgeFrom();
     } elseif ($this->direction === self::DIRECTION_BOTH) {
         return $vertex->getVerticesEdge();
     } else {
         throw new DomainException('Should not happen. Invalid direction setting');
     }
 }