public function setLegs(array $legs)
    {
        $this->legs = array();

        foreach ($legs as $leg) {
            $this->addLeg($leg);
        }
    }
public function setLegs(array $legs)
    {
        $this->legs = array();

        foreach ($legs as $leg) {
            $this->addLeg($leg);
        }
    }
public function setLegs ( array $ legs ) { $ this -> legs = array ( ) ; foreach ( $ legs as $ leg ) { $ this -> addLeg ( $ leg ) ; } }
Sets the route legs

@param array $legs The route legs.
Sets the route legs