* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @package APF-1.6 * @version 1.1 * @since File available since 1.0 * @author Florian TEISSIER <*****@*****.**> * @copyright Copyright (c) 2015 by Teicorp. All rights reserved. */ try { if (!file_exists(SITE_ROOT . DS . 'Src' . DS . 'Controller' . DS . ($route->path('prefix') ? $route->path('prefix') . DS : '') . $route->path('main') . 'Controller.php')) { $site = new \Vendor\Core\CoreSite($config, $route->path('all')); $site->bddCnx(); $site->execute(false); } else { $site = new $controller($config, $route->path('all')); $site->bddCnx(); $site->execute(); } } catch (\Vendor\Core\CoreCNXException $e) { $site->renderCNXError("Une erreur est c'est produite pendant la connexion à la base de donnée"); if (DEBUG) { debug($e, 'connexion bdd'); } }