public function valid(\ORC\Util\File\FileInfo $fileinfo) { if ($this->_min !== null) { if ($fileinfo->getSize() < $this->_min) { throw new Exception('FILESIZE_TOO_SMALL'); } } if ($this->_max !== null) { if ($fileinfo->getSize() > $this->_max) { throw new Exception('FILESIZE_TOO_BIG'); } } }