protected function validateOptionsProperties()
    {
        if (!is_array($this->allowed_file_extensions) && $this->allowed_file_extensions != null) {
            $this->allowed_file_extensions = array($this->allowed_file_extensions);
        }

        if (!is_array($this->file_extensions_mime_types) && $this->file_extensions_mime_types != null) {
            $this->file_extensions_mime_types = null;
        }

        if (is_numeric($this->max_file_size) && !is_int($this->max_file_size)) {
            $this->max_file_size = intval($this->max_file_size);
        } elseif (!is_int($this->max_file_size) && $this->max_file_size != null) {
            $this->max_file_size = null;
        }

        if (
            !is_array($this->max_image_dimensions) || 
            (
                is_array($this->max_image_dimensions) && 
                (
                    count($this->max_image_dimensions) != 2 ||
                    (
                        count($this->max_image_dimensions) == 2 &&
                        count($this->max_image_dimensions) != count($this->max_image_dimensions, COUNT_RECURSIVE)
                    )
                )
            )
        ) {
            $this->max_image_dimensions = array();
        } else {
            if (!is_int($this->max_image_dimensions[0]) || !is_int($this->max_image_dimensions[1])) {
                $this->max_image_dimensions = array();
            }
        }

        if (empty($this->move_uploaded_to)) {
            trigger_error(static::__('The move_uploaded_to property was not set'), E_USER_ERROR);
        }

        if (!is_string($this->new_file_name) && $this->new_file_name != null) {
            $this->new_file_name = null;
        }

        if (!is_bool($this->overwrite)) {
            $this->overwrite = false;
        }

        if (!is_bool($this->web_safe_file_name)) {
            $this->web_safe_file_name = true;
        }

        if (!is_bool($this->security_scan)) {
            $this->security_scan = false;
        }

        if (!is_bool($this->stop_on_failed_upload_multiple)) {
            $this->stop_on_failed_upload_multiple = true;
        }
    }
protected function validateOptionsProperties()
    {
        if (!is_array($this->allowed_file_extensions) && $this->allowed_file_extensions != null) {
            $this->allowed_file_extensions = array($this->allowed_file_extensions);
        }

        if (!is_array($this->file_extensions_mime_types) && $this->file_extensions_mime_types != null) {
            $this->file_extensions_mime_types = null;
        }

        if (is_numeric($this->max_file_size) && !is_int($this->max_file_size)) {
            $this->max_file_size = intval($this->max_file_size);
        } elseif (!is_int($this->max_file_size) && $this->max_file_size != null) {
            $this->max_file_size = null;
        }

        if (
            !is_array($this->max_image_dimensions) || 
            (
                is_array($this->max_image_dimensions) && 
                (
                    count($this->max_image_dimensions) != 2 ||
                    (
                        count($this->max_image_dimensions) == 2 &&
                        count($this->max_image_dimensions) != count($this->max_image_dimensions, COUNT_RECURSIVE)
                    )
                )
            )
        ) {
            $this->max_image_dimensions = array();
        } else {
            if (!is_int($this->max_image_dimensions[0]) || !is_int($this->max_image_dimensions[1])) {
                $this->max_image_dimensions = array();
            }
        }

        if (empty($this->move_uploaded_to)) {
            trigger_error(static::__('The move_uploaded_to property was not set'), E_USER_ERROR);
        }

        if (!is_string($this->new_file_name) && $this->new_file_name != null) {
            $this->new_file_name = null;
        }

        if (!is_bool($this->overwrite)) {
            $this->overwrite = false;
        }

        if (!is_bool($this->web_safe_file_name)) {
            $this->web_safe_file_name = true;
        }

        if (!is_bool($this->security_scan)) {
            $this->security_scan = false;
        }

        if (!is_bool($this->stop_on_failed_upload_multiple)) {
            $this->stop_on_failed_upload_multiple = true;
        }
    }
protected function validateOptionsProperties ( ) { if ( ! is_array ( $ this -> allowed_file_extensions ) && $ this -> allowed_file_extensions != null ) { $ this -> allowed_file_extensions = array ( $ this -> allowed_file_extensions ) ; } if ( ! is_array ( $ this -> file_extensions_mime_types ) && $ this -> file_extensions_mime_types != null ) { $ this -> file_extensions_mime_types = null ; } if ( is_numeric ( $ this -> max_file_size ) && ! is_int ( $ this -> max_file_size ) ) { $ this -> max_file_size = intval ( $ this -> max_file_size ) ; } elseif ( ! is_int ( $ this -> max_file_size ) && $ this -> max_file_size != null ) { $ this -> max_file_size = null ; } if ( ! is_array ( $ this -> max_image_dimensions ) || ( is_array ( $ this -> max_image_dimensions ) && ( count ( $ this -> max_image_dimensions ) != 2 || ( count ( $ this -> max_image_dimensions ) == 2 && count ( $ this -> max_image_dimensions ) != count ( $ this -> max_image_dimensions , COUNT_RECURSIVE ) ) ) ) ) { $ this -> max_image_dimensions = array ( ) ; } else { if ( ! is_int ( $ this -> max_image_dimensions [ 0 ] ) || ! is_int ( $ this -> max_image_dimensions [ 1 ] ) ) { $ this -> max_image_dimensions = array ( ) ; } } if ( empty ( $ this -> move_uploaded_to ) ) { trigger_error ( static :: __ ( 'The move_uploaded_to property was not set' ) , E_USER_ERROR ) ; } if ( ! is_string ( $ this -> new_file_name ) && $ this -> new_file_name != null ) { $ this -> new_file_name = null ; } if ( ! is_bool ( $ this -> overwrite ) ) { $ this -> overwrite = false ; } if ( ! is_bool ( $ this -> web_safe_file_name ) ) { $ this -> web_safe_file_name = true ; } if ( ! is_bool ( $ this -> security_scan ) ) { $ this -> security_scan = false ; } if ( ! is_bool ( $ this -> stop_on_failed_upload_multiple ) ) { $ this -> stop_on_failed_upload_multiple = true ; } }
Validate that these options properties has properly set in the correct type.

@throws Exception Throw errors on invalid property type.
Validate that these options properties has properly set in the correct type .