/**
* Registers repositories from annotations
*/
private function registerAnnotations()
{
$ref = Nette\Reflection\ClassType::from($this);
$annotations = $ref->getAnnotations();
if (isset($annotations['property-read'])) {
$c = get_called_class();
$namespace = substr($c, 0, strrpos($c, '\\'));
foreach ($annotations['property-read'] as $value) {
if (preg_match('#^([\\\\\\w]+Repository)\\s+\\$(\\w+)$#', $value, $m)) {
$class = '\\' . Reflection\AnnotationsParser::expandClassName($m[1], $ref);
$this->register($m[2], $class);
$this->aliases[$m[2]] = $class;
}
}
}
}