Source for file Annotation.php

Documentation is available at Annotation.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  7. 7:  * @license    http://nettephp.com/license  Nette license
  8. 8:  * @link       http://nettephp.com
  9. 9:  * @category   Nette
  10. 10:  * @package    Nette\Reflection
  11. 11:  */
  12. 12:  
  13. 13:  
  14. 14:  
  15. 15: /**
  16. 16:  * Basic annotation implementation.
  17. 17:  *
  18. 18:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  19. 19:  * @package    Nette\Reflection
  20. 20:  */
  21. 21: class Annotation extends Object implements IAnnotation
  22. 22: {
  23. 23:  
  24. 24:     public function __construct(array $values)
  25. 25:     {
  26. 26:         foreach ($values as $k => $v{
  27. 27:             $this->$k $v;
  28. 28:         }
  29. 29:     }
  30. 30:  
  31. 31:  
  32. 32:     /**
  33. 33:      * Returns default annotation.
  34. 34:      * @return string 
  35. 35:      */
  36. 36:     public function __toString()
  37. 37:     {
  38. 38:         return $this->value;
  39. 39:     }
  40. 40:  
  41. 41: }