\Pydio\Core\ServicesApplicationState

Various helpers to get application state, global folders, etc.

Summary

Methods
Properties
Constants
setSapiRestBase()
setSapiTypeCLI()
sapiIsCli()
getSapiRestBase()
sapiUsesSession()
setStateMinisite()
hasMinisiteHash()
getMinisiteHash()
detectApplicationFirstRun()
setApplicationFirstRunPassed()
searchIncludePath()
getTravelPath()
detectServerURL()
getWorkspaceShortcutURL()
getTemporaryFolder()
safeIniSet()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$restBase
$sapiType
$minisiteHash
N/A

Properties

$restBase

$restBase : null|string

Type

null|string

$sapiType

$sapiType : string

Type

string

$minisiteHash

$minisiteHash : string

Type

string

Methods

setSapiRestBase()

setSapiRestBase(string  $restBase) 

Parameters

string $restBase

setSapiTypeCLI()

setSapiTypeCLI() 

sapiIsCli()

sapiIsCli() : boolean

Returns

boolean

getSapiRestBase()

getSapiRestBase() : null|string

Returns

null|string

sapiUsesSession()

sapiUsesSession() : boolean

Returns

boolean

setStateMinisite()

setStateMinisite(  $hash) 

Parameters

$hash

hasMinisiteHash()

hasMinisiteHash() : boolean

Returns

boolean

getMinisiteHash()

getMinisiteHash() : string

Returns

string

detectApplicationFirstRun()

detectApplicationFirstRun() : boolean

Check if data/cache/first_run_passed file exists or not

Returns

boolean

setApplicationFirstRunPassed()

setApplicationFirstRunPassed() 

Touch data/cache/first_run_passed file

searchIncludePath()

searchIncludePath(string  $file) : boolean

Search include path for a given file

Parameters

string $file

Returns

boolean

getTravelPath()

getTravelPath(  $from,   $to) : string

Parameters

$from
$to

Returns

string

detectServerURL()

detectServerURL(boolean  $withURI = false, boolean  $forceInternal = false) : string

Build the current server URL

Parameters

boolean $withURI

Wether to return the "path" part in scheme://host[/path]

boolean $forceInternal

Wether to force server local IP detection, or to use external URL if it is set in the configuration

Returns

string

getWorkspaceShortcutURL()

getWorkspaceShortcutURL(\Pydio\Core\Model\RepositoryInterface  $repository) : string

Parameters

\Pydio\Core\Model\RepositoryInterface $repository

Returns

string

getTemporaryFolder()

getTemporaryFolder() : mixed|null|string

Try to load the tmp dir from the CoreConf AJXP_TMP_DIR, or the constant AJXP_TMP_DIR, or the sys_get_temp_dir

Returns

mixed|null|string

safeIniSet()

safeIniSet(string  $paramName, string  $paramValue) : void

Try to set an ini config, without errors

Parameters

string $paramName
string $paramValue