code: public function getPageSize()
      {
          if ($this->_pageSize === null) {
              if (empty($this->pageSizeLimit)) {
                  $pageSize = $this->defaultPageSize;
                  $this->setPageSize($pageSize);
              } else {
                  $pageSize = (int) $this->getQueryParam($this->pageSizeParam, $this->defaultPageSize);
                  $this->setPageSize($pageSize, true);
              }
          }
  
          return $this->_pageSize;
      }
docs: Returns the number of items per page.
  By default, this method will try to determine the page size by [[pageSizeParam]] in [[params]].
  If the page size cannot be determined this way, [[defaultPageSize]] will be returned.
  @return int the number of items per page. If it is less than 1, it means the page size is infinite,
  and thus a single page contains all items.
  @see pageSizeLimit