What does our stream controller need to do? Let's walk through how we can take our model and turn it into a stream for the user to see.
- Require the stream model class, and instantiate the object.
- If the stream is empty, display an empty stream template.
- If the stream isn't empty, we display the main template and carry on.
- We take the status IDs and turn them into an array we can cache and send to the template. This gives us a list in the template of status IDs. In itself, this isn't useful, but it will be used to duplicate the template tag (where we will insert the status itself), the comments list, and the like / dislike list for each of the statuses, ready for the data to be pushed to the template later.
- We then need to iterate ...