protected function isAllowedExt($sExtension, array $aAllowedExt)
    {
        $aAllowedExt = array_filter($aAllowedExt);

        if (empty($aAllowedExt)) {
            return true;
        }

        //  Sanitise and map common extensions
        $sExtension = $this->sanitiseExtension($sExtension);

        //  Sanitize allowed types
        $aAllowedExt = array_map([$this, 'sanitiseExtension'], $aAllowedExt);
        $aAllowedExt = array_unique($aAllowedExt);
        $aAllowedExt = array_values($aAllowedExt);

        //  Search
        return in_array($sExtension, $aAllowedExt);
    }