Build a Static Site Generator Using SPL Iterators

LIVE PREVIEWBUY FOR $5

Envato Tuts+ Courses

  • Video courses taught by expert instructors.
  • Learn new skills from start to finish.
  • Downloadable Source Files also available on GitHub.

Course Description

In PHP, we’re all familiar with the foreach, for, do-while, and while looping constructs, which help us quickly and easily iterate over data structures in our applications.

vCard QR Code

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.

The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.

But did you know that they’re just the tip of the iceberg, and that you can use these constructs in a much more powerful way?

In this course, Envato Tuts+ instructor Matthew Setter will introduce you to SPL iterators, and teach you how to create iterator classes which allow you to use the looping constructs to iterate over your data in a more powerful, more flexible, and more elegant way than you’ve done before. Along the way, you’ll build a simple static site generator which reads markdown from a filesystem directory listing and creates hydrated value objects which model the data they contain.

What You’ll Learn

  • Build a simple application, based on a stripped-down version of a podcast site.
  • How the SPL allows us to overload, or augment, some of PHP’s basic lexicographical constructs.
  • Working with core SPL classes.
  • Retrieving episode data using FilterIterator and DirectoryIterator.
  • How to iterate over the instantiated list of Episode objects and filter them by publish date.
  • Initializing SPL iterators.

About the Instructor

Matthew Setter is an experienced software developer and freelance technical writer. He is the author of Zend Framework 2 Foundations and is regularly developing with PHP and related technologies. You can visit his website or connect with him on Twitter or LinkedIn.


🕐 Top News in the Last Hour By Importance Score

# Title 📊 i-Score
1 Why Resilient GPS (R-GPS) Matters for US Military Superiority: We Must Address GPS Vulnerabilities 🟢 85 / 100
2 British couple killed in Italian cable car horror 'were 20 seconds from safety': How snapped wire sent victims swinging into pylon then plummeting 100ft when they were just moments from reaching their destination 🔴 75 / 100
3 Putin vows to restart horror strikes on Ukraine as Trump ceasefire hopes collapse 🔴 75 / 100
4 US government announces it has achieved ability to 'manipulate space and time' with new technology 🔴 72 / 100
5 Attacks on Deutsche Bahn staff rise 6% in 2024, chief executive says 🔴 72 / 100
6 Inside the showdown between courts and the WH over deportations 🔴 65 / 100
7 Hot methane seeps could support life beneath Antarctica’s ice sheet 🔴 62 / 100
8 Easter supermarket opening times for Tesco, Asda, Sainsbury’s, Aldi and Morrisons 🔵 60 / 100
9 Warning over medication taken by MILLIONS that can trigger painful cough that lasts for months on end 🔵 52 / 100
10 Hailey Bieber and Rapper Sexyy Red React to Justin Bieber Cheek Kiss Video 🔵 35 / 100

View More Top News ➡️