public function setRating($rating)
    {
        $rating = strtolower($rating);
        $validRatings = array('g', 'pg', 'r', 'x');
        if (!in_array($rating, $validRatings)) {
            throw new InvalidArgumentException(sprintf('Invalid rating "%s" specified, only "g", "pg", "r", or "x" are allowed to be used.', $rating));
        }
        $this->rating = $rating;
        return $this;
    }