Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

User.php 979B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: adrien.gandarias
  5. * Date: 08/04/2015
  6. * Time: 10:10
  7. */
  8. namespace App\Http\DAL\Models;
  9. use App\Http\DBO\UserDBO;
  10. use Illuminate\Database\Eloquent\Model;
  11. /**
  12. * App\Http\DAL\Models\User
  13. *
  14. * @property integer $id
  15. * @property string $name
  16. * @property \Carbon\Carbon $created_at
  17. * @property \Carbon\Carbon $updated_at
  18. * @method static \Illuminate\Database\Query\Builder|\App\Http\DAL\Models\User whereId($value)
  19. * @method static \Illuminate\Database\Query\Builder|\App\Http\DAL\Models\User whereName($value)
  20. * @method static \Illuminate\Database\Query\Builder|\App\Http\DAL\Models\User whereCreatedAt($value)
  21. * @method static \Illuminate\Database\Query\Builder|\App\Http\DAL\Models\User whereUpdatedAt($value)
  22. */
  23. class User extends AbstractModel
  24. {
  25. public function toBusinessModel()
  26. {
  27. $user = new UserDBO();
  28. $user->setId($this->id);
  29. $user->setName($this->name);
  30. return $user;
  31. }
  32. }