class Model in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/serializer/Tests/SerializerTest.php \Symfony\Component\Serializer\Tests\Model
Hierarchy
- class \Symfony\Component\Serializer\Tests\Model
Expanded class hierarchy of Model
File
- vendor/
symfony/ serializer/ Tests/ SerializerTest.php, line 225
Namespace
Symfony\Component\Serializer\TestsView source
class Model {
private $title;
private $numbers;
public static function fromArray($array) {
$model = new self();
if (isset($array['title'])) {
$model
->setTitle($array['title']);
}
if (isset($array['numbers'])) {
$model
->setNumbers($array['numbers']);
}
return $model;
}
public function getTitle() {
return $this->title;
}
public function setTitle($title) {
$this->title = $title;
}
public function getNumbers() {
return $this->numbers;
}
public function setNumbers($numbers) {
$this->numbers = $numbers;
}
public function toArray() {
return array(
'title' => $this->title,
'numbers' => $this->numbers,
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Model:: |
private | property | ||
Model:: |
private | property | ||
Model:: |
public static | function | ||
Model:: |
public | function | ||
Model:: |
public | function | ||
Model:: |
public | function | ||
Model:: |
public | function | ||
Model:: |
public | function |