protected function _loadApi($app)
{
if (isset($this->_cache['ob'][$app]['api'])) {
return $this->_cache['ob'][$app]['api'];
}
$api = null;
$status = array('active', 'notoolbar', 'hidden');
$status[] = $this->isAdmin() ? 'admin' : 'noadmin';
if (in_array($this->applications[$app]['status'], $status)) {
try {
$api = $this->getApiInstance($app, 'api');
} catch (Horde_Exception $e) {
Horde::log($e, 'DEBUG');
}
}
$this->_cache['ob'][$app]['api'] = $api;
return $api;
}