public function setMaxPlays($maxPlays)
    {
        if (is_int($maxPlays) && $maxPlays >= 0) {
            $this->maxPlays = $maxPlays;
        } else {
            $msg = "The 'maxPlays' argument must be a positive (>= 0) integer, '" . gettype($maxPlays) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMaxPlays($maxPlays)
    {
        if (is_int($maxPlays) && $maxPlays >= 0) {
            $this->maxPlays = $maxPlays;
        } else {
            $msg = "The 'maxPlays' argument must be a positive (>= 0) integer, '" . gettype($maxPlays) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMaxPlays ( $ maxPlays ) { if ( is_int ( $ maxPlays ) && $ maxPlays >= 0 ) { $ this -> maxPlays = $ maxPlays ; } else { $ msg = "The 'maxPlays' argument must be a positive (>= 0) integer, '" . gettype ( $ maxPlays ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the maximum number of times the media can be played.

@param integer $maxPlays A positive (>= 0) integer.
@throws \InvalidArgumentException If $maxPlays is not a positive integer.
Set the maximum number of times the media can be played .