Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.70 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. class Packet
  5. {
  6.     private int $id;
  7.     private float $weight;
  8.     private float $width;
  9.     private float $height;
  10.     private int $brittle;
  11.     private User $user;
  12.     private Warehouse $warehouse;
  13.  
  14.     /**
  15.      * Packet constructor.
  16.      * @param int $id
  17.      * @param float $weight
  18.      * @param float $width
  19.      * @param float $height
  20.      * @param int $brittle
  21.      * @param User $user
  22.      * @param Warehouse $warehouse
  23.      */
  24.     public function __construct(int $id, float $weight, float $width, float $height, int $brittle, User $user, Warehouse $warehouse)
  25.     {
  26.         $this->id = $id;
  27.         $this->weight = $weight;
  28.         $this->width = $width;
  29.         $this->height = $height;
  30.         $this->brittle = $brittle;
  31.         $this->user = $user;
  32.         $this->warehouse = $warehouse;
  33.     }
  34.  
  35.  
  36.     /**
  37.      * @return int
  38.      */
  39.     public function getId(): int
  40.     {
  41.         return $this->id;
  42.     }
  43.  
  44.     /**
  45.      * @param int $id
  46.      */
  47.     public function setId(int $id): void
  48.     {
  49.         $this->id = $id;
  50.     }
  51.  
  52.     /**
  53.      * @return float
  54.      */
  55.     public function getWeight(): float
  56.     {
  57.         return $this->weight;
  58.     }
  59.  
  60.     /**
  61.      * @param float $weight
  62.      */
  63.     public function setWeight(float $weight): void
  64.     {
  65.         $this->weight = $weight;
  66.     }
  67.  
  68.     /**
  69.      * @return float
  70.      */
  71.     public function getWidth(): float
  72.     {
  73.         return $this->width;
  74.     }
  75.  
  76.     /**
  77.      * @param float $width
  78.      */
  79.     public function setWidth(float $width): void
  80.     {
  81.         $this->width = $width;
  82.     }
  83.  
  84.     /**
  85.      * @return float
  86.      */
  87.     public function getHeight(): float
  88.     {
  89.         return $this->height;
  90.     }
  91.  
  92.     /**
  93.      * @param float $height
  94.      */
  95.     public function setHeight(float $height): void
  96.     {
  97.         $this->height = $height;
  98.     }
  99.  
  100.     /**
  101.      * @return int
  102.      */
  103.     public function getBrittle(): int
  104.     {
  105.         return $this->brittle;
  106.     }
  107.  
  108.     /**
  109.      * @param int $brittle
  110.      */
  111.     public function setBrittle(int $brittle): void
  112.     {
  113.         $this->brittle = $brittle;
  114.     }
  115.  
  116.     /**
  117.      * @return User
  118.      */
  119.     public function getUser(): User
  120.     {
  121.         return $this->user;
  122.     }
  123.  
  124.     /**
  125.      * @param User $user
  126.      */
  127.     public function setUser(User $user): void
  128.     {
  129.         $this->user = $user;
  130.     }
  131.  
  132.     /**
  133.      * @return Warehouse
  134.      */
  135.     public function getWarehouse(): Warehouse
  136.     {
  137.         return $this->warehouse;
  138.     }
  139.  
  140.     /**
  141.      * @param Warehouse $warehouse
  142.      */
  143.     public function setWarehouse(Warehouse $warehouse): void
  144.     {
  145.         $this->warehouse = $warehouse;
  146.     }
  147.    
  148.    
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement