public function checkExt($ext) { if (is_string($ext)) { $ext = explode(',', $ext); } $extension = strtolower(pathinfo($this->getInfo('name'), PATHINFO_EXTENSION)); if (!in_array($extension, $ext)) { return false; } return true; }