70 throw new \UnexpectedValueException(
71 "reuse_upload and reuse_group should be integers", 400);
85 if (array_key_exists(
"reuse_upload", $reuserArray)) {
86 $this->reuseUpload = filter_var($reuserArray[
"reuse_upload"],
87 FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
89 if (array_key_exists(
"reuse_group", $reuserArray)) {
90 $this->reuseGroup = filter_var($reuserArray[
"reuse_group"],
91 FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
93 if (array_key_exists(
"reuse_main", $reuserArray)) {
94 $this->reuseMain = filter_var($reuserArray[
"reuse_main"],
95 FILTER_VALIDATE_BOOLEAN);
97 if (array_key_exists(
"reuse_enhanced", $reuserArray)) {
98 $this->reuseEnhanced = filter_var($reuserArray[
"reuse_enhanced"],
99 FILTER_VALIDATE_BOOLEAN);
101 if ($this->reuseUpload === null || $this->reuseGroup === null) {
102 throw new \UnexpectedValueException(
103 "reuse_upload and reuse_group should be integers", 400);
148 FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
149 if ($this->reuseUpload === null) {
150 throw new \UnexpectedValueException(
"Reuse upload should be an integer!", 400);
160 FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
161 if ($this->reuseGroup === null) {
162 throw new \UnexpectedValueException(
"Reuse group should be an integer!", 400);
172 FILTER_VALIDATE_BOOLEAN);
181 FILTER_VALIDATE_BOOLEAN);
setUsingArray($reuserArray)
setReuseUpload($reuseUpload)
Model to hold info required by Reuser agent.
setReuseEnhanced($reuseEnhanced)
setReuseGroup($reuseGroup)
__construct($reuseUpload, $reuseGroup, $reuseMain=false, $reuseEnhanced=false)