Thank you for your interest in one of our PHP developer positions.
The next step in our recruitment process is to get a better feel for your ability in PHP. Please complete the task below and reply with a link to a Github gist of your submission (ideally log in to Github and make it a secret gist).
Imagine you are going to build an application to showcase your personal Movie collection. At the heart of this we will need to model a number of entities, although for this task we are only interested in Movies and Actors.
Therefore, create a number of PHP classes that represent these entities and satisfy the following criteria.
- Each entity must have a unique identifier.
- The Movie entity must hold the title, runtime and release date.
- The Actor entity must hold the name and date of birth.
- For all properties consider validation of the values.
- Each entity must contain a method that returns its data as JSON.
- Also provide methods for retrieving the values of each property individually.
- Movies must hold a collection of Actors and the characters being portrayed.
- The Movie entity requires a method of retrieving all Actors ordered by descending age.
When creating these classes remember that we are looking for you to showcase your knowledge and understanding of PHP and OOP.
##Vagrant
- vagrant up
- composer install (or update)