PHP Classes

File: src/App/Component/AjaxResponseTrait.php

Recommend this page to a friend!
  Packages of Thierry Feuzeu   Jaxon   src/App/Component/AjaxResponseTrait.php   Download  
File: src/App/Component/AjaxResponseTrait.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change:
Date: 4 months ago
Size: 543 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\App\Component;

use
Jaxon\Di\Container;
use
Jaxon\Response\AjaxResponse;
use
Jaxon\Response\Response;

trait
AjaxResponseTrait
{
   
/**
     * @var Response
     */
   
protected $response;

   
/**
     * @param Container $di
     *
     * @return void
     */
   
private function setAjaxResponse(Container $di): void
   
{
       
$this->response = $di->getResponse();
    }

   
/**
     * @return Response
     */
   
final protected function response(): AjaxResponse
   
{
        return
$this->response;
    }
}