-
Notifications
You must be signed in to change notification settings - Fork 146
/
bootstrap.php
46 lines (35 loc) · 1013 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* Composer autoloader.
*/
require 'vendor/autoload.php';
/*
* Options
*/
$options = array();
$dotenv = new Dotenv\Dotenv(__DIR__);
$dotenv->load();
$timezone = getenv('TIMEZONE');
date_default_timezone_set($timezone);
//Login
$options['password'] = getenv('PASSWORD');
$options['email'] = getenv('EMAIL');
//Paths
$options['local_path'] = getenv('LOCAL_PATH');
$options['lessons_folder'] = getenv('LESSONS_FOLDER');
$options['series_folder'] = getenv('SERIES_FOLDER');
//Flags
$options['retry_download'] = boolval(getenv('RETRY_DOWNLOAD'));
define('BASE_FOLDER', $options['local_path']);
define('LESSONS_FOLDER', $options['lessons_folder']);
define('SERIES_FOLDER', $options['series_folder']);
define('RETRY_DOWNLOAD', $options['retry_download']);
//laracasts
define('LARACASTS_BASE_URL', 'https://laracasts.com');
define('LARACASTS_POST_LOGIN_PATH', 'sessions');
define('LARACASTS_SERIES_PATH', 'series');
define('LARACASTS_TOPICS_PATH', 'browse/all');
/*
* Vars
*/
set_time_limit(0);