1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

  class Product {
    
    protected $id    = 0;
    protected $title = null;
    protected $price = 0;

    public function __construct($id, $title, $price) {
      $this->id    = $id;
      $this->title = $title;
      $this->price = $price;
    }

    public function getId() {
      return $this->id;
    }

    public function getTitle() {
      return $this->title;
    }

    public function getPrice() {
      return $this->price;
    }
  }