/** * Set multiple options for a Purl transfer * @param Purl $ch * @param array $options * An array specifying which options to set and their values. * The keys should be valid curl_setopt constants or * their integer equivalents. * * @return bool TRUE if all options were successfully set. If an option could * not be successfully set, FALSE is immediately returned, ignoring any * future options in the options array. */ function curl_setopt_array(\Purl $ch, array $options) { foreach ($options as $option => $value) { if (!$ch->setOption($option, $value)) { return false; } } return true; }