BedrockStreaming / roboxt

:no_entry: DEPRECATED - simple parser for robots.txt
19 stars 7 forks source link

Parser parse from content string #5

Closed barryvdh closed 5 years ago

barryvdh commented 9 years ago

From the example:

$parser = new \Roboxt\Parser();
$file = $parser->parse("http://www.google.com/robots.txt");

Perhaps it would be more logical for the parse() method to accept the robots.txt content as string and add a new load() method, to load an url directly. Currently, you can't really use this library when you have the content already, or use a different http client (instead of file_get_contents()).

Or if you don't want to break BC, you could add a new method. But name of parse() doesn't imply it does any fetching of the url..

benja-M-1 commented 9 years ago

hi @barryvdh, that's an interesting idea. Unfortunately I don't have enough time to work on it event if it is rather simple :( Can you submit a pull request with an implementation of your idea?

Thanks

barryvdh commented 9 years ago

Okay, closed in favor of PR #6