protected function replaceRecursive(ArrayOk $withThese, $default = false) { if ($default) { $this->constructRecursively(array_replace_recursive($this->toArray(), $withThese->toArray())); } else { $this->replaceRecursiveNumeric($withThese); } }
public static function json($data) { $data = new ArrayOk($data); // Wrap it as an ArrayOk object in case it's only a partial object return $data->toJson(); }