public function create()
    {
        $content = '';
        $pageNumber = $this->getPageNumber();

        if ($pageNumber === 0) {
            $pageNumber = 1;
        }

        if ($this->lastPage > 1) {
            $content .= "<div class='pagination'>";

            $content .= $this->renderPreviousLink($pageNumber);

            //not enough pages to bother breaking it up
            if ($this->lastPage < 7 + ($this->adjacent * 2)) {
                for ($counter = 1; $counter <= $this->lastPage; $counter++) {
                    $content .= $this->createCurrentActiveLink($pageNumber, $counter);
                }
            } elseif ($this->lastPage > 5 + ($this->adjacent * 2)) {
                //close to beginning; only hide later pages
                if ($pageNumber < 1 + ($this->adjacent * 2)) {
                    for ($counter = 1; $counter < 4 + ($this->adjacent * 2); $counter++) {
                        $content .= $this->createCurrentActiveLink($pageNumber, $counter);
                    }
                    $content .= '...';
                    $content .= $this->createSecondLink();
                } elseif (
                    $this->lastPage - ($this->adjacent * 2) > $pageNumber
                    && $pageNumber > ($this->adjacent * 2)
                ) {
                    $content .= $this->createPrimaryLink();
                    $content .= '...';

                    for (
                        $counter = $pageNumber - $this->adjacent;
                        $counter <= $pageNumber + $this->adjacent;
                        $counter++
                    ) {
                        $content .= $this->createCurrentActiveLink($pageNumber, $counter);
                    }

                    $content .= '...';
                    $content .= $this->createPrimaryLink();
                    $content .= $this->createSecondLink();
                } else {
                    //close to end; only hide early pages

                    $content .= $this->createPrimaryLink();

                    $content .= '...';
                    for (
                        $counter = $this->lastPage - (2 + ($this->adjacent * 2));
                        $counter <= $this->lastPage;
                        $counter++
                    ) {
                        $content .= $this->createCurrentActiveLink($pageNumber, $counter);
                    }
                }
            }

            $content .= $this->renderNextLink($counter, $pageNumber);
        }

        $this->paginationLinks = $content;
    }