示例#1
0
 /**
  * Replace the entire dataset with the new payload provided
  *
  * Data will always be transmitted as JSON to Socrata even though different forms are accepted. In order to pass
  * other forms of data, you must use a Converter class that has a `toJson()` method, such as the CsvConverter.
  *
  * @param  array|Converter|JSON $payload  The data that will be upserted to the Socrata dataset as a PHP array, an
  *                                        instance of a Converter child class, or a JSON string
  *
  * @link   http://dev.socrata.com/publishers/replace.html Replacing a dataset with Replace
  *
  * @see    Converter
  * @see    CsvConverter
  *
  * @since  0.1.0
  *
  * @return mixed
  */
 public function replace($payload)
 {
     $upsertData = $this->handleJson($payload);
     return $this->urlQuery->sendPut($upsertData, $this->sodaClient->associativeArrayEnabled());
 }