/** * Parses a given experiments. Not meant to be used except for testing. * * @param \stdClass $json the json bit retrieved from the API that represents experiments. * @return \Prismic\Experiments e manipulable object for that experiments. */ public static function parse(\stdClass $json) { return new Experiments(array_map(function ($exp) { return Experiment::parse($exp); }, $json->draft), array_map(function ($exp) { return Experiment::parse($exp); }, $json->running)); }