mirror of
https://github.com/Mibew/design.git
synced 2025-01-22 18:10:33 +03:00
Update Database::throwException function
Now it returns previous set value.
This commit is contained in:
parent
289fb76906
commit
7bf20e29e7
@ -217,11 +217,21 @@ Class Database{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set if exceptions must be process into the class or thrown.
|
* Set if exceptions must be process into the class or thrown and return
|
||||||
* @param boolean $value
|
* previous value.
|
||||||
|
*
|
||||||
|
* If called without arguments just return previous value without changing
|
||||||
|
* anything.
|
||||||
|
*
|
||||||
|
* @param boolean $value Value that should be set. This argument is optional
|
||||||
|
* @return bool Previous value
|
||||||
*/
|
*/
|
||||||
public function throwExeptions($value){
|
public function throwExeptions(){
|
||||||
$this->throwExceptions = $value;
|
$last_value = $this->throwExceptions;
|
||||||
|
if (func_num_args() > 0) {
|
||||||
|
$this->throwExceptions = func_get_arg(0);
|
||||||
|
}
|
||||||
|
return $last_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user