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

Save the fact that content is an ical content #336

Closed
wants to merge 2 commits into from
Closed

Conversation

axi
Copy link

@axi axi commented Apr 11, 2024

The parser does already the job, so we can use it to "validate" it's really an ical content.

src/ICal/ICal.php Outdated Show resolved Hide resolved
@axi axi requested a review from u01jmg3 April 12, 2024 15:16
@axi
Copy link
Author

axi commented Apr 22, 2024

Hey @u01jmg3, could you check this PR ? Thanks

@axi
Copy link
Author

axi commented Apr 22, 2024

just thinking about this, I'm using the parser in a loop and before passing it a new url to parse, I have to

                // Reset from potential previous iteration
                $ical->cal = [];
                $ical->isIcalContent = false;

Should'nt that be in a new reset() method ?
I can update the PR (or create a new one probably)

@u01jmg3
Copy link
Owner

u01jmg3 commented Apr 22, 2024

I've sat on this one for a bit and I don't think knowing that a file starts with BEGIN:VCALENDAR is enough to say you've validated it as iCal content.

I think if you need this in your code you should track it yourself.

@u01jmg3 u01jmg3 closed this Apr 22, 2024
@axi
Copy link
Author

axi commented Apr 22, 2024

Ok. For reference, this would probably be the minimum for validating a ical content: https://stackoverflow.com/a/67698638/2454746

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

Successfully merging this pull request may close these issues.

2 participants