Skip to content
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

Split loading and parsing in separate methods #8

Closed
lommes opened this issue May 15, 2017 · 6 comments
Closed

Split loading and parsing in separate methods #8

lommes opened this issue May 15, 2017 · 6 comments

Comments

@lommes
Copy link
Contributor

lommes commented May 15, 2017

Hi,

I played around and really like your package. It would be a nice addition if loading and parsing of the gpx data would be split in different methods, so it can be parsed from database entries.

Regards
Timo

@Sibyx
Copy link
Owner

Sibyx commented May 16, 2017

Hi,
thanks! So if I get it right you want to split phpGPX::load() method into multiple methods which allows loading from other sources? For example:

  • loadFromFile()
  • loadFromString()

Regards
Jakub

@Sibyx Sibyx added the feature label May 16, 2017
@lommes
Copy link
Contributor Author

lommes commented May 16, 2017

Or, which might even be easier, keep the load method with the file as parameter, read files content and directly pass it to a second method which does the stuff from here to here. So load will stay the loadFromFile and the new method can be used directly to load from string.

@Sibyx
Copy link
Owner

Sibyx commented May 16, 2017

Yop, also quite a good idea, but there is one more thing to resolve: we have to somehow provide a backward compatibility with previous. I am not very sure if its a good idea to change a parameter in the phpGPX::load function.

@lommes
Copy link
Contributor Author

lommes commented May 16, 2017

This will not break anything since the path is already the only parameter. I will create a pull request to clarify later.

@Sibyx
Copy link
Owner

Sibyx commented May 16, 2017

Ah, yes I see, we just need implement extra function for loading data from string which will be used in phpGPX::load(). I hope I get it now :D Looking forward to your pull request!

@Sibyx
Copy link
Owner

Sibyx commented May 16, 2017

Resolved & implemented with #9 Thank you 👍

@Sibyx Sibyx closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants