Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Shibly  >  Decorator pattern  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Decorator pattern
Implements the decorator design pattern
Author: By
Last change:
Date: 2 years ago
Size: 461 bytes
 

Contents

Class file image Download
<?php
spl_autoload_extensions
(".php");
spl_autoload_register();


$books = new Items\books("Jeffry Way""Learn Jquery in 30 Days"100);
$books->display();
$borrow = new \Decorator\Borrowable($books);
$borrow->borrowItem("Shibly");
$borrow->borrowItem("Sujon");
$borrow->borrowItem("Raju");
$borrow->borrowItem("Tanmay");
$borrow->borrowItem("Tarin");
$borrow->display();
$books->display();
$borrow->returnItem("Shibly");
$borrow->display();
$books->display();