File indexing completed on 2024-04-14 15:55:20

0001 <?php
0002 /**
0003  * ocs-fileserver
0004  *
0005  * Copyright 2016 by pling GmbH.
0006  *
0007  * This file is part of ocs-fileserver.
0008  *
0009  * ocs-fileserver is free software: you can redistribute it and/or modify
0010  * it under the terms of the GNU Affero General Public License as published by
0011  * the Free Software Foundation, either version 3 of the License, or
0012  * (at your option) any later version.
0013  *
0014  * ocs-fileserver is distributed in the hope that it will be useful,
0015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  * GNU Affero General Public License for more details.
0018  *
0019  * You should have received a copy of the GNU Affero General Public License
0020  * along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 
0023 function trigger_deprecation() {}
0024 
0025 include '../../vendor/autoload.php';
0026 
0027 require_once '../../library/Flooer/Application.php';
0028 
0029 $application = new Flooer_Application(
0030     array(
0031         'baseDir'          => '../../api_application',
0032         'memoryLimit'      => '512M',
0033         'maxExecutionTime' => 660,
0034         'socketTimeout'    => 600,
0035         'autoloadConfig'   => array(
0036             'register' => false,
0037         ),
0038     )
0039 );
0040 
0041 switch (strtolower(getenv('APPLICATION_ENV'))) {
0042     case 'debug':
0043         $application->setConfig('environment', 'debug');
0044         break;
0045     case 'development':
0046         $application->setConfig('environment', 'development');
0047         break;
0048     case 'production':
0049     default:
0050         $application->setConfig('environment', 'production');
0051         break;
0052 }
0053 
0054 $application->run();