<commit_before><?php

class pagination
{
	private $start;
	private $limit;
	private $page = 0; 
	private $table; 
	
	private $adjacent_num = 1; 	
	private $row_count = 0;
	private $page_num = 0;
	private $entity = '';
	private $params = array();
	private $inline = false;

	private $limit_options = array(
		10 		=> 10,
		25 		=> 25,
		50 		=> 50,
		100 	=> 100,
		250		=> 250,
		500		=> 500,
		1000 	=> 1000,
	);

	public function __construct($entity = '', $row_count = 0, $params = array(), $inline = false)
	{
		$this->limit = $params['limit'] ?: 25;
		$this->start = $params['start'] ?: 0;
		$this->row_count = $row_count;
		$this->entity = $entity;
		$this->params = $params;
		$this->inline = $inline;

		$this->page_num = ceil($this->row_count / $this->limit);
		$this->page = floor($this->start / $this->limit);

		if (!$this->limit_options[$this->limit])
		{
			$this->limit_options[$this->limit] = $this->limit;
			ksort($this->limit_options);
		}
	}

	public function render(){

		echo '<div class="row"><div class="col-md-12">';
		echo '<ul class="pagination">';

		if ($this->page)<commit_msg>hide pagination in printview<commit_after><?php

class pagination
{
	private $start;
	private $limit;
	private $page = 0; 
	private $table; 
	
	private $adjacent_num = 1; 	
	private $row_count = 0;
	private $page_num = 0;
	private $entity = '';
	private $params = array();
	private $inline = false;

	private $limit_options = array(
		10 		=> 10,
		25 		=> 25,
		50 		=> 50,
		100 	=> 100,
		250		=> 250,
		500		=> 500,
		1000 	=> 1000,
	);

	public function __construct($entity = '', $row_count = 0, $params = array(), $inline = false)
	{
		$this->limit = $params['limit'] ?: 25;
		$this->start = $params['start'] ?: 0;
		$this->row_count = $row_count;
		$this->entity = $entity;
		$this->params = $params;
		$this->inline = $inline;

		$this->page_num = ceil($this->row_count / $this->limit);
		$this->page = floor($this->start / $this->limit);

		if (!$this->limit_options[$this->limit])
		{
			$this->limit_options[$this->limit] = $this->limit;
			ksort($this->limit_options);
		}
	}

	public function render(){

		echo '<div class="row print-hide"><div class="col-md-12">';
		echo '<ul class="pagination">';

		if ($this->page)
{'fraction_non_alphanumeric': 0.19794459338695264, 'fraction_numerical': 0.04289544235924933, 'mean_word_length': 3.5693877551020408, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '895507', 'n_tokens_mistral': 989, 'n_tokens_neox': 831, 'n_words': 187}