/** * listClasses returns a list of available OrientDB classes for the current database * * @return OClass[] */ public function listClasses() { $res = $this->_cn->getDatabaseInfo(); /** @var OClass[] $hasSuper */ $hasSuper = []; /** @var OClass[] $classes */ $classes = []; foreach ($res['classes'] as $meta) { $classes[$meta['name']] = $c = new OClass($meta); if (!empty($meta->superClass)) { $hasSuper[] = $c; } } foreach ($hasSuper as $c) { $c->setSuperClass($classes[$c->getSuperClassName()]); } return $classes; }