/** * Get streams of a game. * * @return Service */ public static function game() { // Allow for unlimited arguments or an array. $games = self::convertArgs(func_get_args()); $gameObjects = []; foreach ($games as $game) { // Build an array of the stream objects. $gameObjects = array_merge($gameObjects, StreamDriver::byGame($game, static::$service)); } // Store the streams in a new Service. $streams = new Service($gameObjects); // Sort by viewers. $streams->sort(); return $streams; }