<commit_before><?php //-->
 
namespace Front\Block;

use Eden\Block\Base as Block;
/**
 * The base class for any class that defines a view.
 * A view controls how templates are loaded as well as 
 * being the final point where data manipulation can occur.
 *
 * @vendor Openovate
 * @package Framework
 */
class Pagination extends Block 
{
	/* Constants
	-------------------------------*/
	/* Public Properties
	-------------------------------*/
	/* Protected Properties
	-------------------------------*/
	protected $start = 0;
	protected $range = 25;
	protected $total = 0;
	protected $show	= 5;
	protected $query = array();
	protected $url = null;
	protected $class = null;
	
	/* Private Properties
	-------------------------------*/
	/* Magic
	-------------------------------*/
	/* Public Methods
	-------------------------------*/
	public function getVariables()
	{
		$pages 	= ceil($this->total / $this->range);
		$page 	= floor($this->start / $this->range) + 1;
		 
		$min 	= $page - $this->show;
		$max 	= $page + $this->show;
		
		if($min < 1) {
			$min = 1;
		}
		
		if($max > $pages) {
			$max = $pages;
		}
		
		return array(
			'class'	=> $this->class,
			'url'	=> $this->url,
			'query' => $this->query,
			'start' => $this->start,
			'range' => $this->range,
			'total' => $this->total,
			'show'	=> $this->show,
			'min'	=> $min,
			'max'	=> $max, 
			'pages' => $pages,
			'page'	=> $page);<commit_msg>quick fix for pagination string<commit_after><?php //-->
 
namespace Front\Block;

use Eden\Block\Base as Block;
/**
 * The base class for any class that defines a view.
 * A view controls how templates are loaded as well as 
 * being the final point where data manipulation can occur.
 *
 * @vendor Openovate
 * @package Framework
 */
class Pagination extends Block 
{
	/* Constants
	-------------------------------*/
	/* Public Properties
	-------------------------------*/
	/* Protected Properties
	-------------------------------*/
	protected $start = 0;
	protected $range = 25;
	protected $total = 0;
	protected $show	= 5;
	protected $query = array();
	protected $url = null;
	protected $class = null;
	
	/* Private Properties
	-------------------------------*/
	/* Magic
	-------------------------------*/
	/* Public Methods
	-------------------------------*/
	public function getVariables()
	{
		$pages 	= ceil($this->total / $this->range);
		$page 	= floor($this->start / $this->range) + 1;
		 
		$min 	= $page - $this->show;
		$max 	= $page + $this->show;
		
		if($min < 1) {
			$min = 1;
		}
		
		if($max > $pages) {
			$max = $pages;
		}
        
        $get = $_GET;
        unset($get['page']);
        $this->query = $get;
		
		return array(
			'class'	=> $this->class,
			'url'	=> $this->url,
			'query' => $this->query,
			'start' => $this->start,
			'range' => $this->range,
			'total' => $this->total,
			'show'	=> $this->show,
			'min'	=> $min,
			'max'	=> $max, 
			'pages' => $pages,
			'page'	=> $page);
{'fraction_non_alphanumeric': 0.28455008488964345, 'fraction_numerical': 0.005432937181663837, 'mean_word_length': 1.737918215613383, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 56, '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': '1749716', 'n_tokens_mistral': 1062, 'n_tokens_neox': 936, 'n_words': 254}