We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi everyone
referring to the following example, from the README.md
$result = $feedIo->read($url, $feed, $modifiedSince);
I can't understand what is the purpose of the $feed argument ? And why is it mandatory ?
The text was updated successfully, but these errors were encountered:
Hi 👋
Yes, it could be more explicit. $feed is expected to be an instance of FeedInterface or null.
$feed
FeedInterface
null
feedInterface
(so it's a mandatory argument with which can be null)
In both scenarios, the freshly populated $feed will be embedded in the $result.
$result
Now, why ? It's to let you use your own class if you need to. Let's imagine that you use your own class to store data, you could something like:
$result = $feedIo->read($url, $feed, $modifiedSince); // a bit risky without any proper check before $feed->save();
Sorry, something went wrong.
No branches or pull requests
Hi everyone
referring to the following example, from the README.md
$result = $feedIo->read($url, $feed, $modifiedSince);
I can't understand what is the purpose of the $feed argument ? And why is it mandatory ?
The text was updated successfully, but these errors were encountered: