/** * Builds an OMB_Profile object from array * * The method builds an OMB_Profile object from the passed parameters array. The * array MUST provide a profile URI. The array fields HAVE TO be named according * to the OMB standard. The prefix (omb_listener or omb_listenee) is passed as a * parameter. * * @param string $parameters An array containing the profile parameters. * @param string $prefix The common prefix of the profile parameter keys. * * @access public * * @returns OMB_Profile The built OMB_Profile. */ public static function fromParameters($parameters, $prefix) { if (!isset($parameters[$prefix])) { throw new OMB_InvalidParameterException('', 'profile', $prefix); } $profile = new OMB_Profile($parameters[$prefix]); $profile->updateFromParameters($parameters, $prefix); return $profile; }