public function addAllowedType($type)
    {
        if (!in_array(strtolower($type), $this->allowedTypes)) {
            $this->allowedTypes[] = strtolower($type);
        }
        return $this;
    }
public function addAllowedType($type)
    {
        if (!in_array(strtolower($type), $this->allowedTypes)) {
            $this->allowedTypes[] = strtolower($type);
        }
        return $this;
    }
public function addAllowedType ( $ type ) { if ( ! in_array ( strtolower ( $ type ) , $ this -> allowedTypes ) ) { $ this -> allowedTypes [ ] = strtolower ( $ type ) ; } return $ this ; }
Add an allowed type

@param  string $type
@return Upload
Add an allowed type