public function disable($pos = null)
    {
        if ($pos === null || !in_array($pos, array_keys($this->segments))) {
            throw new OutOfRangeException('Refering to non existent Segment position!');
        } else {
            $selectedSegment = $this->segments[$pos];
            $selectedSegment->disable();
        }

        return $this;
    }
public function disable($pos = null)
    {
        if ($pos === null || !in_array($pos, array_keys($this->segments))) {
            throw new OutOfRangeException('Refering to non existent Segment position!');
        } else {
            $selectedSegment = $this->segments[$pos];
            $selectedSegment->disable();
        }

        return $this;
    }
public function disable ( $ pos = null ) { if ( $ pos === null || ! in_array ( $ pos , array_keys ( $ this -> segments ) ) ) { throw new OutOfRangeException ( 'Refering to non existent Segment position!' ) ; } else { $ selectedSegment = $ this -> segments [ $ pos ] ; $ selectedSegment -> disable ( ) ; } return $ this ; }
Disables a Segment at the given position.

Segment will still remain, but won't be translated, and will be handled
specially in the building process.

Supports method chaining.

@param int $pos Position of the element
@return \Noherczeg\Breadcrumb\Breadcrumb
@throws OutOfRangeException
Disables a Segment at the given position .