Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
use Laminas\Mvc\Application;
6
use Laminas\Stdlib\ArrayUtils;
7
 
8
//define('DIR_URL', dirname(__DIR__));
9
//define('SITE_URL',  'http://'  . $_SERVER['SERVER_NAME'] . '/');
10
//date_default_timezone_set('Etc/GMT+6');
11
 
12
ini_set('display_errors', '1');
13
ini_set('display_startup_errors', '1');
3086 efrain 14
ini_set('log_errors', '1');
1 www 15
error_reporting(E_ALL);
16
 
17
 
18
/**
19
 * This makes our life easier when dealing with paths. Everything is relative
20
 * to the application root now.
21
 */
22
chdir(dirname(__DIR__));
23
 
24
// Decline static file requests back to the PHP built-in webserver
25
if (php_sapi_name() === 'cli-server') {
26
    $path = realpath(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
27
    if (is_string($path) && __FILE__ !== $path && is_file($path)) {
28
        return false;
29
    }
30
    unset($path);
31
}
32
 
33
// Composer autoloading
34
include __DIR__ . '/../vendor/autoload.php';
35
 
36
if (! class_exists(Application::class)) {
37
    throw new RuntimeException(
38
        "Unable to load application.\n"
39
        . "- Type `composer install` if you are developing locally.\n"
40
        . "- Type `vagrant ssh -c 'composer install'` if you are using Vagrant.\n"
41
        . "- Type `docker-compose run lamians composer install` if you are using Docker.\n"
42
    );
43
}
44
 
45
// Retrieve configuration
46
$appConfig = require __DIR__ . '/../config/application.config.php';
47
if (file_exists(__DIR__ . '/../config/development.config.php')) {
48
    $appConfig = ArrayUtils::merge($appConfig, require __DIR__ . '/../config/development.config.php');
49
}
50
 
51
// Run the application!
52
Application::init($appConfig)->run();