Skip to content

Using Dumpers #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mackhankins opened this issue Dec 19, 2014 · 5 comments
Closed

Using Dumpers #16

mackhankins opened this issue Dec 19, 2014 · 5 comments
Assignees
Milestone

Comments

@mackhankins
Copy link

mackhankins commented Dec 19, 2014

Have you considered adding the dumpers feature? Any idea how to implement this?

@toin0u
Copy link
Member

toin0u commented Dec 21, 2014

Hi @mack-hankins,

Thanks for your message, why not it can be a good idea actually ? You're welcome to make a PR if you want :)

If you need a dumper asap just instantiate it, something like this should work:

//...
try {
    $geocoded = Geocoder::geocode('copenhagen');
    $dumper = new \Geocoder\Dumper\GpxDumper();
    $strGpx = $dumper->dump($geocoded);
    echo $strGpx;
} catch (\Exception $e) {
    // No exception will be thrown here
    echo $e->getMessage();
}

@toin0u
Copy link
Member

toin0u commented Dec 22, 2014

@mack-hankins Maybe should we provide a facade factory for dumpers, what do you think ?

@mackhankins
Copy link
Author

@toin0u I think that would be the best approach. I don't know if I have time for a pull request, but your solution worked for now.

@toin0u
Copy link
Member

toin0u commented Dec 22, 2014

Ok let's keep this open and I'll try to find time for that :) Anyway thanks for reporting this ! Merry Christmas :)

@mikebronner
Copy link
Member

This will be available in the next release. :) Should be forthcoming shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants