But php-avro-schema-generator does not look in it.
// in ../DAO/DemoNotification.php
class DemoNotification {
private string $content;
public function __construct(string $content) {
$this->content = $content;
}
public function getContent(): string {
return $this->content;
}
}
$data = new DemoNotification("Hello");
$registry = (new ClassRegistry())
->addClassDirectory(__DIR__ . '/../DAO')
->load();
$generator = new SchemaGenerator($registry, '');
$schemas = $generator->generate();
echo(current($schemas)); // Out: {"type":"record","name":"DemoNotification","namespace":"App.DAO","fields":[{"name":"content","type":""}]}
{"type":"record","name":"DemoNotification","namespace":"App.DAO","fields":[{"name":"content","type":""}]}
{"type":"record","name":"DemoNotification","namespace":"App.DAO","fields":[{"name":"content","type":"string"}]}