Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'index.view.php';
- class Product {
- public $description;
- protected $available = true;
- public function __construct($description)
- {
- $this->description = $description;
- }
- public function unavailable()
- {
- $this->available = false;
- }
- public function isAvailable()
- {
- return $this->available;
- }
- }
- $products = [
- new Product('Oriental Herbal Nutrient'),
- new Product('Lactobacillus Serum'),
- new Product('Dandelion FPJ')
- ];
- $products[0]->unavailable();
Add Comment
Please, Sign In to add comment