The Artima Developer Community
Sponsored Link

PHP Buzz Forum
Annotations in PHP

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sebastian Bergmann

Posts: 313
Nickname: sbergmann
Registered: Sep, 2004

Sebastian Bergmann is the developer of PHPUnit.
Annotations in PHP Posted: Apr 18, 2005 10:58 PM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Sebastian Bergmann.
Original Post: Annotations in PHP
Feed Title: Sebastian Bergmann
Feed URL: http://sebastian-bergmann.de/
Feed Description: Geek by nature, PHP by choice.
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Sebastian Bergmann
Latest Posts From Sebastian Bergmann

Advertisement
Yesterday someone proposed adding support for annotations to the PHP Interpreter. Although it would be nice to have this kind of functionality out-of-the-box and built into the interpreter itself this is not necessary.

I could not resist and started working on a package that exends the Reflection API of PHP 5 by adding getAnnotations(), getAnnotation($name), and hasAnnotation($name) methods to ReflectionClass, ReflectionFunction, ReflectionMethod, and ReflectionProperty.

The syntax for annotations follows the standard for PHP Doc Comments and @foo bar declares an annotation of name "foo" with value "bar".

The inital code (which does not do any annotation parsing, yet) can be found here:A usage example can be found here.

Read: Annotations in PHP

Topic: Solar 0.1.1 released Previous Topic   Next Topic Topic: Devshed and iGrep are f*cking spammers

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use