PHP Classes

File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of AlexanderC  >  AOPHP  >  tests/bootstrap.php  >  Download  
File: tests/bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: AOPHP
Alter the behavior of classes with AOP
Author: By
Last change: added more cache drivers
add comments to example class DockBlocks
implement basic AOP
implement basic AOP
Date: 8 months ago
Size: 733 bytes


Class file image Download
 * @author AlexanderC <>
 * @date 10/28/13
 * @time 8:24 PM

require __DIR__ . '/../autoload.php';

$AOPHP = \AOPHP\AOPHP::crete();

// see DocBlockTest to understand lib usage
$object = new DocBlockTest();

// add target object (methods called on this)
// add aspect object (advices would be applied before and after calling a target)
//$AOPHP->addAspect($AOPHP->createAspect(clone $object));

// call target method
//$AOPHP->advice($object, 'doThings', ['"Lorem Ipsum dolor sit amet"']);
// call another target method
//$AOPHP->advice($object, 'doAnotherThings', ['"Lorem Ipsum dolor sit amet"']);

$object->doThings("Lorem Ipsum dolor sit amet");

For more information send a message to info at phpclasses dot org.