public function toArray($reindex = false)
    {
        $array = [];

        foreach ($this as $key => $path) {
            if ($reindex) {
                $array[] = (string) clone $path;
            } else {
                $array[$key] = (string) clone $path;
            }
        }

        return $array;
    }
public function toArray($reindex = false)
    {
        $array = [];

        foreach ($this as $key => $path) {
            if ($reindex) {
                $array[] = (string) clone $path;
            } else {
                $array[$key] = (string) clone $path;
            }
        }

        return $array;
    }
public function toArray ( $ reindex = false ) { $ array = [ ] ; foreach ( $ this as $ key => $ path ) { if ( $ reindex ) { $ array [ ] = ( string ) clone $ path ; } else { $ array [ $ key ] = ( string ) clone $ path ; } } return $ array ; }
Convert paths bag to array, and every path to string.

@param bool $reindex

@return  array  Raw paths.

@since  2.0
Convert paths bag to array and every path to string .