public function atomAtDefault($index, $default = null)
    {
        $atoms = $this->atoms();
        if ($index < 0) {
            $index = count($atoms) + $index;
        }

        if (array_key_exists($index, $atoms)) {
            return $atoms[$index];
        }

        return $default;
    }
public function atomAtDefault($index, $default = null)
    {
        $atoms = $this->atoms();
        if ($index < 0) {
            $index = count($atoms) + $index;
        }

        if (array_key_exists($index, $atoms)) {
            return $atoms[$index];
        }

        return $default;
    }
public function atomAtDefault ( $ index , $ default = null ) { $ atoms = $ this -> atoms ( ) ; if ( $ index < 0 ) { $ index = count ( $ atoms ) + $ index ; } if ( array_key_exists ( $ index , $ atoms ) ) { return $ atoms [ $ index ] ; } return $ default ; }
Get a single path atom by index, falling back to a default if the index
is undefined.

@param integer $index   The index to search for.
@param mixed   $default The default value to return if no atom is defined for the supplied index.

@return mixed The path atom, or $default if no atom is defined for the supplied index.
Get a single path atom by index falling back to a default if the index is undefined .