Should be implemented for each renderer itself (just default).

@return int
10647
public function getCurrentPageNumber()
    {
        $request = $this->getRequest();

        $optionsRenderer = $this->getOptionsRenderer();
        $parameterNames = $optionsRenderer['parameterNames'];
        if ($request->getParam($parameterNames['currentPage']) != '') {
            return (int) $request->getParam($parameterNames['currentPage']);
        }

        return (int) 1;
    }
993082
public function int()
    {
        return $this->markErrorIf(!is_numeric($this->value) || strval(intval($this->value)) != strval($this->value) );
    }
783858
public function getWidth() : ?int 
    {
        if ( ! $this->hasWidth()) {
            $this->setWidth($this->getDefaultWidth());
        }
        return $this->width;
    }
1121977
public function getDefaultChildTemplateId(): int
    {
        if (!empty($this->{self::ATTR_CHILD_TEMPLATE})) {
            return (int) $this->{self::ATTR_CHILD_TEMPLATE};
        }

        $parent = $this->getParent();

        return ($parent && !empty($parent->getGrandchildTemplateId())) ?
            $parent->getGrandchildTemplateId()
            : $this->getTemplateId();
    }
1347630
protected function getRenderer()
    {
        if ($this->renderer === null) {
            $this->renderer = $this->serviceLocator->get('ViewRenderer');
        }

        return $this->renderer;
    }
928794
public function getRendererName()
    {
        $options = $this->getOptions();
        $parameterName = $options['generalParameterNames']['rendererType'];

        if ($this->forceRenderer !== null) {
            // A special renderer was given -> use is
            $rendererName = $this->forceRenderer;
        } else {
            // DEFAULT
            if ($this->getRequest() instanceof ConsoleRequest) {
                $rendererName = $options['settings']['default']['renderer']['console'];
            } else {
                $rendererName = $options['settings']['default']['renderer']['http'];
            }
        }

        // From request
        if ($this->getRequest() instanceof HttpRequest && $this->getRequest()->getQuery($parameterName) != '') {
            $rendererName = $this->getRequest()->getQuery($parameterName);
        }

        return $rendererName;
    }
519065
private function decrementRendering()
    {
        if ($this->renderCounter > 0) {
            $this->renderCounter--;

            $this->dispatchEvent('rendering.decremented', $this->renderCounter);
        }

        return $this;
    }
259744
public function getRenderedLine()
    {
        if (isset($this->_detectMatch[1]) && ($nbr = substr($this->_detectMatch[1], 1)) && is_numeric($nbr))
            $this->_nbrParagraphs = $nbr;
        $result = '';
        for ($i = 0; $i < $this->_nbrParagraphs; $i++)
            $result .= $this->_getParagraph($i == 0);
        return ($result);
    }
632378
public function getTotalPages()
    {
        if ($this->totalItems > 0 && $this->itemsPerPage > 0) {
            if (($this->totalItems%$this->itemsPerPage) != 0) {
                return (int)($this->totalItems/$this->itemsPerPage) + 1;
            }
            else {
                return (int)($this->totalItems/$this->itemsPerPage);
            }
        }

        return 0;
    }
901272
public function getDefaultRendering($something) {

        $renderer = new QtiPLRenderer($this->getCRO());
        return $something->getQtiClassName() . $renderer->writeChildElements($something->getExpressions());
    }
1356426
public function render() {
    $recursive_iter_iter = $this->getRecursiveIterator();

    $render = [];
    foreach ($recursive_iter_iter as $value) {
      $key = $recursive_iter_iter->key();
      $depth = $recursive_iter_iter->getDepth();

      $indent = str_repeat('  ', $depth);

      if (is_array($value)) {
        $render[] = "$indent'$key' => [";
      }
      else {
        // Quote the value if it's not an expression.
        // WTF, '£' is unicode???
        $first_char = mb_substr($value, 0, 1);
        if (!in_array($first_char, ['£', '\\', '['])) {
          $value = '"' . $value . '"';
        }

        $render[] = "$indent'$key' => $value,";

        if (!$recursive_iter_iter->hasNext() && $depth) {
          $indent = $depth ? str_repeat('  ', $recursive_iter_iter->getDepth() - 1) : '';

          $render[] = "$indent],";
        }
      }
    }

    return $render;
  }
428691
public function originalRender()
    {
        Piwik::checkObjectTypeIs($this->table, array('Simple', 'DataTable'));

        if ($this->table instanceof Simple) {
            $array = $this->renderSimpleTable($this->table);
        } elseif ($this->table instanceof DataTable) {
            $array = $this->renderTable($this->table);
        }

        if ($this->serialize) {
            $array = serialize($array);
        }
        return $array;
    }
552892
public function getDepth() : ?int 
    {
        if ( ! $this->hasDepth()) {
            $this->setDepth($this->getDefaultDepth());
        }
        return $this->depth;
    }
968450
public function evaluate()
    {
        $rendererPath = sprintf('%s/renderer', $this->path);
        $canRenderWithRenderer = $this->runtime->canRender($rendererPath);
        $renderPath = $this->getRenderPath();

        if ($canRenderWithRenderer) {
            $renderedElement = $this->runtime->evaluate($rendererPath, $this);
        } elseif ($renderPath !== null) {
            if (substr($renderPath, 0, 1) === '/') {
                $renderedElement = $this->runtime->render(substr($renderPath, 1));
            } else {
                $renderedElement = $this->runtime->render($this->path . '/' . str_replace('.', '/', $renderPath));
            }
        } else {
            $renderedElement = $this->runtime->render(
                sprintf('%s/element<%s>', $this->path, $this->getType())
            );
        }
        return $renderedElement;
    }
591324
public function jsRender()
    {
        $ret = '';

        // start with constructor
        $ret .= $this->_library;

        // next perhaps we have arguments
        if ($this->_constructorArgs) {
            $ret .= $this->_renderArgs($this->_constructorArgs);
        }

        // next we do same with the calls
        foreach ($this->_chain as $chain) {
            if (is_array($chain)) {
                $ret .= '.'.$chain[0].$this->_renderArgs($chain[1]);
            } elseif (is_numeric($chain)) {
                $ret .= '['.$chain.']';
            } else {
                $ret .= '.'.$chain;
            }
        }

        return $ret;
    }
1289727
public function renderName() : string
    {
        $label = !empty($this->defaultOptions['label']) ? $this->defaultOptions['label'] : '';

        $renderer = $this->config->getProvider('renderName');
        $renderer = new $renderer($this->config);
        $result = $renderer->provide($label);

        return $result;
    }
699358
public function totalPages()
    {
        $total = $this->totalObjects();
        $perPage = $this->objectsPerPage();

        return (int) ceil($total / $perPage);
    }