Changeset 724

Show
Ignore:
Timestamp:
06/10/07 11:55:46 (1 year ago)
Author:
mikey
Message:

added an example to illustrate that ticket #69 already works

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/docroot/reflection/annotations.php

    r711 r724  
    8383 
    8484define('MY_CONSTANT', 'This is a constant.'); 
     85 
    8586/** 
    8687 * Class that makes use of the Foo annotation and a constant. 
     
    8990 */ 
    9091class ConstantAnnotation { 
     92} 
     93 
     94class ClazzWithConstant 
     95{ 
     96    const FOO = 'This is a class constant.'; 
     97} 
     98 
     99/** 
     100 * Class that makes use of the Foo annotation and a class constant. 
     101 * 
     102 * @Foo(bar=ClazzWithConstant::FOO, baz=false) 
     103 */ 
     104class AnotherConstantAnnotation { 
    91105} 
    92106 
     
    103117checkForFoo('MyClass'); 
    104118checkForFoo('ConstantAnnotation'); 
     119checkForFoo('AnotherConstantAnnotation'); 
    105120checkForFoo('MyClass2'); 
    106121print "</pre>";