Ticket stuff slowly taking shape
parent
a4af2e668f
commit
a2c98a5a26
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: mkoch
|
||||||
|
* Date: 1/31/2017
|
||||||
|
* Time: 9:31 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BusinessLogic\Tickets;
|
||||||
|
|
||||||
|
|
||||||
|
class Attachment {
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $savedName;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: mkoch
|
||||||
|
* Date: 1/31/2017
|
||||||
|
* Time: 10:13 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace BusinessLogic\Tickets;
|
||||||
|
|
||||||
|
|
||||||
|
use DataAccess\Tickets\TicketGateway;
|
||||||
|
|
||||||
|
class TicketRetriever {
|
||||||
|
/**
|
||||||
|
* @var $ticketGateway TicketGateway
|
||||||
|
*/
|
||||||
|
private $ticketGateway;
|
||||||
|
|
||||||
|
function __construct($ticketGateway) {
|
||||||
|
$this->ticketGateway = $ticketGateway;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTicketById($id, $heskSettings, $userContext) {
|
||||||
|
return $this->ticketGateway->getTicketById($id, $heskSettings);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Controllers\Tickets;
|
||||||
|
|
||||||
|
use BusinessLogic\Tickets\TicketRetriever;
|
||||||
|
|
||||||
|
|
||||||
|
class TicketController {
|
||||||
|
function get($id) {
|
||||||
|
global $applicationContext, $hesk_settings, $userContext;
|
||||||
|
|
||||||
|
/* @var $ticketRetriever TicketRetriever */
|
||||||
|
$ticketRetriever = $applicationContext->get['TicketRetriever'];
|
||||||
|
|
||||||
|
output($ticketRetriever->getTicketById($id, $hesk_settings, $userContext));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue