PHP Classes

File: examples/ADT/linkedlist.php

Recommend this page to a friend!
  Classes of Nicola Covolo   Decorate   examples/ADT/linkedlist.php   Download  
File: examples/ADT/linkedlist.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Decorate
Alter functions running code before and after
Author: By
Last change: Update of examples/ADT/linkedlist.php
Date: 8 months ago
Size: 340 bytes
 

Contents

Class file image Download
<?php
require '../../Decorate.php';

$a = new OnAfterDecorativeLinkedList();
$a->push(function(){ echo 1;});
$a->push(function(){ echo 2;});
$a->push(function(){ echo 3;});
$a();

echo
'<br>';

$a = new OnBeforeDecorativeLinkedList();
$a->push(function(){ echo 1;});
$a->push(function(){ echo 2;});
$a->push(function(){ echo 3;});
$a();

?>