public function getAppDrivers($app, $prefix)
{
$classes = array();
$fileprefix = strtr($prefix, '_', '/');
$fileroot = $this->get('fileroot', $app);
if (!is_null($fileroot)) {
try {
$pushed = $this->pushApp($app);
} catch (Horde_Exception $e) {
if ($e->getCode() == Horde_Registry::AUTH_FAILURE) {
return array();
}
throw $e;
}
if (is_dir($fileroot . '/lib/' . $fileprefix)) {
try {
$di = new DirectoryIterator($fileroot . '/lib/' . $fileprefix);
foreach ($di as $val) {
if (!$val->isDir() && !$di->isDot()) {
$class = $app . '_' . $prefix . '_' . basename($val, '.php');
if (class_exists($class)) {
$classes[] = $class;
}
}
}
} catch (UnexpectedValueException $e) {
}
}
if ($pushed) {
$this->popApp();
}
}
return $classes;
}