I want to read comments defined in a specific format next to properties of a PHP Class. e.g.
Class Test
{
public $name; //(:Username)
public $Dob; //(:BirthDate)
}
I want a similar output like some array which gives me $name
and Username
I have tried with using PHP Reflection Class but it doesn't work like how I want it to be:
$reflection = new ReflectionClass('Test');
print_r($reflection->getProperty("name")->getDocComment());
Aucun commentaire:
Enregistrer un commentaire