PHP 클래스 Voodoo\Core\Env

파일 보기 프로젝트 열기: voodoophp/voodoo 1 사용 예제들

공개 메소드들

메소드 설명
getAppRootDir ( ) : string Get the app dir
getApplicationBaseDir ( ) : string Get the running application's base dir, usually the root where index.php is being run
getConfigPath ( ) : string Get the config
getFrontControllerPath ( ) : string Return the front controller path
getHostName ( ) : string Get the server http host name
getPublicAssetsPath ( ) : string Get the public assets
getRootDir ( ) : string Root of Voodoo directory
getServerName ( ) : string Return the server name
getUrl ( ) : string Get the domain url
getVoodooistPath ( )
isCLI ( ) : boolean Check if the SAPI is CLI or not
isDev ( ) : boolean Check if DEV enviroment
isHttps ( ) : boolean Check if the environment is under HTTPS
isProduction ( ) : boolean Check if PRODUCTION enviroment
isStaging ( ) : boolean Check if STAGING enviroment
sessionStart ( ) To start a session if it's not active Once set, you can use $_SESSION to work with your data
set ( integer $env = self::DEV ) Set the environment we're working on. ie: DEV, PRODUCTION, STAGING
setAppRootDir ( $rootDir ) Set the app dir
setConfigPath ( string $dirName ) By default the config is under /App/_conf, But you can have multiple environment like production, dev So it would be placed under /App/_conf/production, /App/_conf/dev etc $dirname is the subdirectory name, ie: production
setFrontControllerPath ( $rootDir ) Set the front controller path, where the index will be created
setPublicAssetsPath ( string $rootDir ) Set the public assets

메소드 상세

getAppRootDir() 공개 정적인 메소드

Get the app dir
public static getAppRootDir ( ) : string
리턴 string

getApplicationBaseDir() 공개 정적인 메소드

Get the running application's base dir, usually the root where index.php is being run
public static getApplicationBaseDir ( ) : string
리턴 string

getConfigPath() 공개 정적인 메소드

Get the config
public static getConfigPath ( ) : string
리턴 string

getFrontControllerPath() 공개 정적인 메소드

Return the front controller path
public static getFrontControllerPath ( ) : string
리턴 string

getHostName() 공개 정적인 메소드

Get the server http host name
public static getHostName ( ) : string
리턴 string

getPublicAssetsPath() 공개 정적인 메소드

Get the public assets
public static getPublicAssetsPath ( ) : string
리턴 string

getRootDir() 공개 정적인 메소드

Root of Voodoo directory
public static getRootDir ( ) : string
리턴 string

getServerName() 공개 정적인 메소드

Return the server name
public static getServerName ( ) : string
리턴 string

getUrl() 공개 정적인 메소드

Get the domain url
public static getUrl ( ) : string
리턴 string

getVoodooistPath() 공개 정적인 메소드

public static getVoodooistPath ( )

isCLI() 공개 정적인 메소드

Check if the SAPI is CLI or not
public static isCLI ( ) : boolean
리턴 boolean

isDev() 공개 정적인 메소드

Check if DEV enviroment
public static isDev ( ) : boolean
리턴 boolean

isHttps() 공개 정적인 메소드

Check if the environment is under HTTPS
public static isHttps ( ) : boolean
리턴 boolean

isProduction() 공개 정적인 메소드

Check if PRODUCTION enviroment
public static isProduction ( ) : boolean
리턴 boolean

isStaging() 공개 정적인 메소드

Check if STAGING enviroment
public static isStaging ( ) : boolean
리턴 boolean

sessionStart() 공개 정적인 메소드

To start a session if it's not active Once set, you can use $_SESSION to work with your data
public static sessionStart ( )

set() 공개 정적인 메소드

Set the environment we're working on. ie: DEV, PRODUCTION, STAGING
public static set ( integer $env = self::DEV )
$env integer

setAppRootDir() 공개 정적인 메소드

Set the app dir
public static setAppRootDir ( $rootDir )

setConfigPath() 공개 정적인 메소드

By default the config is under /App/_conf, But you can have multiple environment like production, dev So it would be placed under /App/_conf/production, /App/_conf/dev etc $dirname is the subdirectory name, ie: production
public static setConfigPath ( string $dirName )
$dirName string

setFrontControllerPath() 공개 정적인 메소드

Set the front controller path, where the index will be created
public static setFrontControllerPath ( $rootDir )

setPublicAssetsPath() 공개 정적인 메소드

Set the public assets
public static setPublicAssetsPath ( string $rootDir )
$rootDir string