private function validateCorrectProperties()
    {
        if (!is_bool($this->current_page_link)) {
            $this->current_page_link = false;
        }

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

        if (is_numeric($this->items_per_page)) {
            $this->items_per_page = intval($this->items_per_page);
            if ($this->items_per_page <= 0) {
                $this->items_per_page = 10;
            }
        } elseif (!is_numeric($this->items_per_page)) {
            $this->items_per_page = 10;
        }

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

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

        if (is_numeric($this->number_adjacent_pages)) {
            $this->number_adjacent_pages = intval($this->number_adjacent_pages);
            if ($this->number_adjacent_pages < 0) {
                $this->number_adjacent_pages = 5;
            }
        } else {
            $this->number_adjacent_pages = 5;
        }

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

        if ($this->page_number_type != 'start_num' && $this->page_number_type != 'page_num') {
            $this->page_number_type = 'start_num';
        }

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

        if (is_numeric($this->unavailable_after)) {
            $this->unavailable_after = intval($this->unavailable_after);
            if ($this->unavailable_after <= 0) {
                $this->unavailable_after = 2;
            }
        } else {
            $this->unavailable_after = false;
        }

        if (is_numeric($this->unavailable_before)) {
            $this->unavailable_before = intval($this->unavailable_before);
            if ($this->unavailable_before <= 0) {
                $this->unavailable_before = 2;
            }
        } else {
            $this->unavailable_before = false;
        }

        if (!is_bool($this->unavailable_display)) {
            $this->unavailable_display = false;
        }
    }
private function validateCorrectProperties()
    {
        if (!is_bool($this->current_page_link)) {
            $this->current_page_link = false;
        }

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

        if (is_numeric($this->items_per_page)) {
            $this->items_per_page = intval($this->items_per_page);
            if ($this->items_per_page <= 0) {
                $this->items_per_page = 10;
            }
        } elseif (!is_numeric($this->items_per_page)) {
            $this->items_per_page = 10;
        }

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

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

        if (is_numeric($this->number_adjacent_pages)) {
            $this->number_adjacent_pages = intval($this->number_adjacent_pages);
            if ($this->number_adjacent_pages < 0) {
                $this->number_adjacent_pages = 5;
            }
        } else {
            $this->number_adjacent_pages = 5;
        }

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

        if ($this->page_number_type != 'start_num' && $this->page_number_type != 'page_num') {
            $this->page_number_type = 'start_num';
        }

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

        if (is_numeric($this->unavailable_after)) {
            $this->unavailable_after = intval($this->unavailable_after);
            if ($this->unavailable_after <= 0) {
                $this->unavailable_after = 2;
            }
        } else {
            $this->unavailable_after = false;
        }

        if (is_numeric($this->unavailable_before)) {
            $this->unavailable_before = intval($this->unavailable_before);
            if ($this->unavailable_before <= 0) {
                $this->unavailable_before = 2;
            }
        } else {
            $this->unavailable_before = false;
        }

        if (!is_bool($this->unavailable_display)) {
            $this->unavailable_display = false;
        }
    }
private function validateCorrectProperties ( ) { if ( ! is_bool ( $ this -> current_page_link ) ) { $ this -> current_page_link = false ; } if ( ! is_bool ( $ this -> first_page_always_show ) ) { $ this -> first_page_always_show = false ; } if ( is_numeric ( $ this -> items_per_page ) ) { $ this -> items_per_page = intval ( $ this -> items_per_page ) ; if ( $ this -> items_per_page <= 0 ) { $ this -> items_per_page = 10 ; } } elseif ( ! is_numeric ( $ this -> items_per_page ) ) { $ this -> items_per_page = 10 ; } if ( ! is_bool ( $ this -> last_page_always_show ) ) { $ this -> last_page_always_show = false ; } if ( ! is_bool ( $ this -> next_page_always_show ) ) { $ this -> next_page_always_show = false ; } if ( is_numeric ( $ this -> number_adjacent_pages ) ) { $ this -> number_adjacent_pages = intval ( $ this -> number_adjacent_pages ) ; if ( $ this -> number_adjacent_pages < 0 ) { $ this -> number_adjacent_pages = 5 ; } } else { $ this -> number_adjacent_pages = 5 ; } if ( ! is_bool ( $ this -> number_display ) ) { $ this -> number_display = false ; } if ( $ this -> page_number_type != 'start_num' && $ this -> page_number_type != 'page_num' ) { $ this -> page_number_type = 'start_num' ; } if ( ! is_bool ( $ this -> previous_page_always_show ) ) { $ this -> previous_page_always_show = false ; } if ( is_numeric ( $ this -> unavailable_after ) ) { $ this -> unavailable_after = intval ( $ this -> unavailable_after ) ; if ( $ this -> unavailable_after <= 0 ) { $ this -> unavailable_after = 2 ; } } else { $ this -> unavailable_after = false ; } if ( is_numeric ( $ this -> unavailable_before ) ) { $ this -> unavailable_before = intval ( $ this -> unavailable_before ) ; if ( $ this -> unavailable_before <= 0 ) { $ this -> unavailable_before = 2 ; } } else { $ this -> unavailable_before = false ; } if ( ! is_bool ( $ this -> unavailable_display ) ) { $ this -> unavailable_display = false ; } }
Validate that properties values have correct data and type.
It will be set to default if the values are incorrect.
Validate that properties values have correct data and type . It will be set to default if the values are incorrect .