HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/jhtaxatie.creativefellows.nl/classes/LabelController.php
<?php

	/**
	* Description
	*/
	class LabelController extends BaseController
	{
								
		function __construct($db_connection,$router,$user_id,$view=null,$user_role=null,$settings=null)
		{
			
			$this->db 			= $db_connection;
			$this->router		= $router;
			$this->view 		= $view;
			$this->user_role	= $user_role;
			$this->user_id 		= $user_id;
			
			$this->settings		= $settings;			
			$this->baseUrl 		= $this->settings['baseUrl'];
			$this->siteUrl 		= $this->settings['siteUrl'];		
			$this->fields		= $this->settings['inspection_fields'];
						
		}
		
		/*
		 * get pdf with generated data
		 */
		public function getPdf($request, $response, $args)
		{
			
			$label = new LabelPdf($this->settings["font_folder"],$args);
			$label->setSourceFile($this->settings["stellingen_pdf_tp"]);
			
			$pdf_label = $label->create("I");
			
	        $response->getBody()->write( $pdf_label );
			$response = $response->withHeader( 'Content-type', 'application/pdf' );
			
			return $response;
			
			
		}
		
				
	}

?>