private function checkExt($ext) { if (!empty($this->allowExts)) { return in_array(strtolower($ext), $this->allowExts, true); } return true; }