public function isAllowed($ext)
    {
        $disallowed = ((count($this->disallowedTypes) > 0) && (in_array(strtolower($ext), $this->disallowedTypes)));
        $allowed    = ((count($this->allowedTypes) == 0) ||
            ((count($this->allowedTypes) > 0) && (in_array(strtolower($ext), $this->allowedTypes))));

        return ((!$disallowed) && ($allowed));
    }
public function isAllowed($ext)
    {
        $disallowed = ((count($this->disallowedTypes) > 0) && (in_array(strtolower($ext), $this->disallowedTypes)));
        $allowed    = ((count($this->allowedTypes) == 0) ||
            ((count($this->allowedTypes) > 0) && (in_array(strtolower($ext), $this->allowedTypes))));

        return ((!$disallowed) && ($allowed));
    }
public function isAllowed ( $ ext ) { $ disallowed = ( ( count ( $ this -> disallowedTypes ) > 0 ) && ( in_array ( strtolower ( $ ext ) , $ this -> disallowedTypes ) ) ) ; $ allowed = ( ( count ( $ this -> allowedTypes ) == 0 ) || ( ( count ( $ this -> allowedTypes ) > 0 ) && ( in_array ( strtolower ( $ ext ) , $ this -> allowedTypes ) ) ) ) ; return ( ( ! $ disallowed ) && ( $ allowed ) ) ; }
Determine if a file type is allowed

@param  string $ext
@return boolean
Determine if a file type is allowed