Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15677 | Rev 15679 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15670 anderson 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Controller;
6
 
7
use Laminas\Mvc\Controller\AbstractActionController;
8
use Laminas\View\Model\ViewModel;
15673 anderson 9
use Laminas\View\Model\JsonModel;
15670 anderson 10
 
11
// Create an action controller.
12
class DiscoveryContactProgressController extends AbstractActionController
13
{
14
    // Define an action "world".
15
    public function indexAction()
16
    {
15674 anderson 17
        $currentUserPlugin = $this->plugin('currentUserPlugin');
18
        $currentUser = $currentUserPlugin->getUser();
19
        $currentCompany = $currentUserPlugin->getCompany();
15670 anderson 20
 
15674 anderson 21
        $request = $this->getRequest();
22
        if ($request->isGet()) {
15677 anderson 23
            $headers  = $request->getHeaders();
24
            $isJson = false;
15678 anderson 25
 
15677 anderson 26
            return new JsonModel([
27
                'success' => true,
15678 anderson 28
                'message' => $headers
15677 anderson 29
            ]);
15675 anderson 30
        }
15673 anderson 31
        return new JsonModel([
32
            'success' => true,
15676 anderson 33
            'message' => $currentUser
15673 anderson 34
        ]);
15670 anderson 35
    }
36
}