We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Property Annotations "name" of property

Hi!

I am working with the annotation parser for building up an admin interface. Everything works quiet well, but I can't find a solution for following issue:

if($propertiesAnnotation->has("Field")) {
    $propertiesAnnotation = $propertiesAnnotation->get("Field");
    $this->_displayFields[] = $propertiesAnnotation->getArgument(0);
}

I need to get the "name" of the class property:

/**
  * @Field("MongoID")
 */
 public $_id; // <- Name of the property 

In this case I need to get the name "_id". How can I get it? Is there a simple solution?

Thank you!