thrownewMDJailSecurityOptionNotSetException("It has not been specified, which memory limit the script should hold. Set MD_JAIL->memory_limit = string.");
thrownewException('Failed to change memory_limit to '.$this->memory_limit);
}
}
/**
*Appliesthemaximumexecutiontimesetting.
*
*@returnvoid
*/
privatefunction_apply_time_limit():void{
if(!isset($this->max_execution_time)){
thrownewMDJailSecurityOptionNotSetException("It has not been specified, which maximum execution time the script should hold. Set MD_JAIL->max_execution_time = integer.");
thrownewException('Failed to change max_execution_time to '.$this->max_execution_time);
}
}
/**
*Appliesbasedirrestrictions.
*
*@returnvoid
*/
privatefunction_apply_basedir_restriction():void{
if(empty($this->_open_basedir)){
thrownewMDJailSecurityOptionNotSetException("It has not been specified, which memory limit the script should hold. Set MD_JAIL->open_basedir = string.");
// Special instructions on CLI, so as to not disturb PHPUnit
if(PHP_SAPI==='cli'){
if(!isset($this->memory_limit)){
thrownewMDJailSecurityOptionNotSetException("It has not been specified, which memory limit the script should hold. Set MD_JAIL->memory_limit = string.");
}
if(!isset($this->max_execution_time)){
thrownewMDJailSecurityOptionNotSetException("It has not been specified, which maximum execution time the script should hold. Set MD_JAIL->max_execution_time = integer.");