Annotations

From Tlalokes

Jump to: navigation, search

Annotations in Tlalokes

PHP comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions and methods as well as extensions. Additionally, also offers ways of retrieving doc comments for functions, classes, methods and properties.

Tlalokes Framework uses the PHP reflection API and a simple and fast parser to provide access to your annotations. This parser actually can interpret the following syntax:

/**
 * @MySimpleValueIntegerAnnotation( 123456 )
 * @MySimpleValueStringAnnotation ( "my simple value" )
 * @my_multivalue_annotation( keyone = 'hello', key_two='here', Key_three='ok' )
 */
class Foo {
  /**
   * @MyProperty_Annotation( 'something' )
   */
  public $property;
  /**
   * @MyMethodAnnotation ( key='value' )
   */
  public function myMethod ( $arg )
  {
    // your code..
  }
}

>==External links==



>=Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page=



CLICK HERE


Personal tools