123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /**
- * Created by PhpStorm.
- * User: adrien.gandarias
- * Date: 08/04/2015
- * Time: 10:10
- */
-
- namespace App\Http\DBO;
-
-
- use Illuminate\Database\Eloquent\Model;
-
- class UserDBO extends AbstractModel
- {
- /**
- * @var int
- */
- private $id;
-
- /**
- * @var string
- */
- private $name;
-
- /**
- * (PHP 5 >= 5.4.0)<br/>
- * Specify data which should be serialized to JSON
- * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
- * @return mixed data which can be serialized by <b>json_encode</b>,
- * which is a value of any type other than a resource.
- */
- function jsonSerialize()
- {
- return [
- 'id' => $this->id,
- 'name' => $this->name
- ];
- }
-
- /**
- * @param int $id
- */
- public function setId($id)
- {
- $this->id = $id;
- }
-
- /**
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
-
- /**
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
-
- /**
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- }
|