protected function getConfig($filename = null)
 {
     try {
         $app = new Manage_Application($this->_getEnvironment(), APPLICATION_PATH . '/configs/application.ini');
         $dbConfig = $app->getConfig()->resources->multidb->manage->toArray();
         $config = array('db' => array('adapter' => $this->_convertPdoDriverToZendDbAdapter('mysql'), 'params' => $dbConfig), 'patch_directory' => realpath(__DIR__ . '/../../../../database/patch'), 'color' => true);
     } catch (Exception $e) {
         die($e->getMessage() . "\n");
     }
     return new Zend_Config($config);
 }
<?php

/**
 * SAML 2.0 remote IdP metadata for simpleSAMLphp.
 *
 * Remember to remove the IdPs you don't use from this file.
 *
 * See: https://rnd.feide.no/content/idp-remote-metadata-reference
 */
require_once 'Manage/Application.php';
$application = new Manage_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
$appConfig = $application->getConfig();
$metadata[$appConfig->auth->simplesamlphp->idp->entityId] = array('entityid' => $appConfig->auth->simplesamlphp->idp->entityId, 'SingleSignOnService' => array(0 => array('Binding' => $appConfig->auth->simplesamlphp->idp->binding, 'Location' => $appConfig->auth->simplesamlphp->idp->location)), 'keys' => array(array('signing' => true, 'type' => 'X509Certificate', 'X509Certificate' => $appConfig->auth->simplesamlphp->idp->cert)));
/**
 * SURFconext Manage
 *
 * LICENSE
 *
 * Copyright 2011 SURFnet bv, The Netherlands
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 *
 * @category  SURFconext Manage
 * @package
 * @copyright Copyright © 2010-2011 SURFnet bv, The Netherlands (http://www.surfnet.nl)
 * @license   http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 */
### Strict Transport Security (ForceHTTPS)
header('Strict-Transport-Security: max-age=15768000 ; includeSubDomains');
include __DIR__ . '/_include.php';
/** Zend_Application */
require_once 'Manage/Application.php';
// Create application, bootstrap, and run
$application = new Manage_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
$application->bootstrap()->run();