Build a Static Site Generator Using SPL Iterators
Envato Tuts+ Courses
- Video programs taught by professional instructors.
- Learn new expertise from begin to end.
- Downloadable Source Files additionally accessible on GitHub.
Course Description
In PHP, we’re all conversant in the foreach, for, do-while, and whereas looping constructs, which assist us rapidly and simply iterate over information buildings in our purposes.
But do you know that they’re simply the tip of the iceberg, and that you should utilize these constructs in a far more highly effective approach?
In this course, Envato Tuts+ teacher Matthew Setter will introduce you to SPL iterators, and educate you the way to create iterator courses which let you use the looping constructs to iterate over your information in a extra highly effective, extra versatile, and extra elegant approach than you’ve executed earlier than. Along the way in which, you’ll construct a easy static website generator which reads markdown from a filesystem listing itemizing and creates hydrated worth objects which mannequin the information they include.
What You’ll Learn
- Build a easy utility, primarily based on a stripped-down model of a podcast website.
- How the SPL permits us to overload, or increase, a few of PHP’s fundamental lexicographical constructs.
- Working with core SPL courses.
- Retrieving episode information utilizing FilterIterator and DirectoryIterator.
- How to iterate over the instantiated checklist of Episode objects and filter them by publish date.
- Initializing SPL iterators.
About the Instructor
Matthew Setter is an skilled software program developer and freelance technical author. He is the creator of Zend Framework 2 Foundations and is repeatedly growing with PHP and associated applied sciences. You can go to his website or join with him on Twitter or LinkedIn.