class Person { private $name; public function setName($name) { $this->name = $name; } public function getName() { return $this->name; } } $person = new Person(); $person->setData('name', 'John Doe'); echo $person->getName(); // Output: John Doe
use Illuminate\Support\Fluent; $data = new Fluent(); $data->setData('name', 'John Doe'); $data->setData('age', 30); $data->setData('email', 'john.doe@example.com');In this example, `setData()` is used on an object created using the `Fluent` class from the Laravel framework. Three different pieces of data are being set: name, age, and email. Based on the use of the `Fluent` class, it can be determined that this example is using the Laravel framework.