public function extension() { $ext = null; if ($this->success) { $ext = pathinfo($_FILES[$this->index]['name'], PATHINFO_EXTENSION); } return $ext; }