public function setDirection($direction)
    {
        if ($direction !== self::DIRECTION_FORWARD && $direction !== self::DIRECTION_REVERSE && $direction !== self::DIRECTION_BOTH) {
            throw new InvalidArgumentException('Invalid direction given');
        }
        $this->direction = $direction;

        return $this;
    }
public function setDirection($direction)
    {
        if ($direction !== self::DIRECTION_FORWARD && $direction !== self::DIRECTION_REVERSE && $direction !== self::DIRECTION_BOTH) {
            throw new InvalidArgumentException('Invalid direction given');
        }
        $this->direction = $direction;

        return $this;
    }
public function setDirection ( $ direction ) { if ( $ direction !== self :: DIRECTION_FORWARD && $ direction !== self :: DIRECTION_REVERSE && $ direction !== self :: DIRECTION_BOTH ) { throw new InvalidArgumentException ( 'Invalid direction given' ) ; } $ this -> direction = $ direction ; return $ this ; }
set direction in which to follow adjacent vertices

@param  int             $direction
@return AlgorithmSearch $this (chainable)
@throws Exception
@see AlgorithmSearch::getVerticesAdjacent()
set direction in which to follow adjacent vertices