// CurrentPage returns the page number of the current page
338788
func (l Links) CurrentPage() (int, error) {
	switch {
	case l.Previous == "" && l.Next != "":
		return 1, nil
	case l.Previous != "":
		prevPage, err := pageForURL(l.Previous)
		if err != nil {
			return 0, err
		}

		return prevPage + 1, nil
	}
	return 0, nil
}
1294553
func (s *IPCredentialList) FirstPage() (*IPCredentialList, error) {
	return s.getPage(s.Meta.FirstPageUri)
}
311947
func (c *IPChannelList) FirstPage() (*IPChannelList, error) {
	return c.getPage(c.Meta.FirstPageUri)
}
723792
func (p *Pager) Pages() Pages {
	if len(p.paginatedElements) == 0 {
		return paginatorEmptyPages
	}

	if pages, ok := p.element().(Pages); ok {
		return pages
	}

	return paginatorEmptyPages
}
585399
func (i *ProjectIter) Current() (*Project, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
605671
func (c *IPMemberList) FirstPage() (*IPMemberList, error) {
	return c.getPage(c.Meta.FirstPageUri)
}
129360
func (s *IPServiceList) FirstPage() (*IPServiceList, error) {
	return s.getPage(s.Meta.FirstPageUri)
}
832188
func (i *TeamIter) Current() (*Team, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
648456
func (p *Pagination) FirstPage() bool {
	return p == nil || p.ForceFirstPage || (len(p.Next) == 0 && len(p.Previous) == 0)
}
368524
func (surface *Surface) ShowPage() {
	C.cairo_surface_show_page(surface.Ptr)
	if err := surface.status(); err != nil {
		panic(err)
	}
}
1268451
func (i *ProviderIter) Current() (*Provider, error) {
	if i.err != nil {
		return nil, i.err
	}
	return &i.page[i.i], nil
}
456756
func (p *WebPage) Page(name string) (*WebPage, error) {
	var resp struct {
		Ref refJSON `json:"ref"`
	}
	if err := p.ref.process.doJSON("POST", "/webpage/Page", map[string]interface{}{"ref": p.ref.id, "name": name}, &resp); err != nil {
		return nil, err
	}
	if resp.Ref.ID == "" {
		return nil, nil
	}
	return &WebPage{ref: newRef(p.ref.process, resp.Ref.ID)}, nil
}
206671
func (s *IPUserList) FirstPage() (*IPUserList, error) {
	return s.getPage(s.Meta.FirstPageUri)
}
264846
func (p Pages) Next(cur Page) Page {
	for x, c := range p {
		if c.Eq(cur) {
			if x < len(p)-1 {
				return p[x+1]
			}
			// TODO(bep) consider return nil here to get it line with the other Nexts
			return p[0]
		}
	}
	return nil
}
1351260
protected function setCurrentPage($currentPage, $pageName)
    {
        $currentPage = $currentPage ?: static::resolveCurrentPage($pageName);

        return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1;
    }
560975
func (l *ListMetricsOptions) AdvancePage(next *PaginationMeta) ListMetricsOptions {
	return ListMetricsOptions{
		PaginationMeta: next,
		Name:           l.Name,
	}
}
214675
def _set_current_page(self, current_page):
        
        if not current_page:
            self.resolve_current_page()

        if not self._is_valid_page_number(current_page):
            return 1

        return current_page