| | |
| | | */ |
| | | public function setNumMaxFiles($numero) { |
| | | if (!is_integer($numero) || $numero <= 0) { |
| | | throw new UploadFile_Exc(); |
| | | throw new Upload_Exc_Error(); |
| | | } |
| | | |
| | | $this->numMaxFiles = $numero; |
| | |
| | | //validazione |
| | | if (strlen(trim($strSize)) === 0) { |
| | | //una stringa vuota non può essere convertita |
| | | throw new UploadFile_Exc(); |
| | | throw new Upload_Exc_Error(); |
| | | } elseif (strlen(trim($strValue)) === 0) { |
| | | //se non trovo la parte del valore della stringa non posso convertire |
| | | throw new UploadFile_Exc(); |
| | | throw new Upload_Exc_Error(); |
| | | } elseif (strlen($strUnit) >= 1 && !array_key_exists($strUnit, $Units)) { |
| | | //l'unita' non e' nota |
| | | throw new UploadFile_Exc(); |
| | | throw new Upload_Exc_Error(); |
| | | } |
| | | |
| | | $Exponent = isset($Units[$strUnit]) ? $Units[$strUnit] : 0; |