summaryrefslogtreecommitdiff
path: root/protected/Settings.php
blob: e568421c51604fead5c14ccfa4f1e21335fe86b6 (plain)
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
<?php
/**
 * Created by IntelliJ IDEA.
 * User: root
 * Date: 8/15/13
 * Time: 11:17 AM
 * To change this template use File | Settings | File Templates.
 */


class Settings {
    static $BasePath  =  "";
    static $CachePath = "";
    static $YoutubeDlCommand = "youtube-dl ";
    static $PythonCommand = "python ";
    static $DeveloperPassword = "JHdfgJ346Kfgfh345fgjfns435346dkgnksdg469849JKJf";
    static $Domain = "";
    static $CacheDownloadMaxSpeed = false; //false for disable

    public static function setConfigs(){
        $baseDir = dirname(__FILE__) . "/../";

        self::$BasePath = $baseDir;
        self::$CachePath = $baseDir."cache/" ;

        $_SERVER['REQUEST_SCHEME'] = (isset($_SERVER['REQUEST_SCHEME'])) ? $_SERVER['REQUEST_SCHEME'] : "http";

        self::$Domain = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'];

    }
}