Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15638 anderson 1
<?php
2
 
15640 anderson 3
declare(strict_types=1);
15638 anderson 4
 
15640 anderson 5
namespace LeadersLinked\Controller;
6
 
7
use Laminas\View\Model\ViewModel;
15638 anderson 8
use Laminas\Mvc\Controller\AbstractActionController;
9
 
10
// Create an action controller.
11
class DiscoveryContactProgressController extends AbstractActionController
12
{
15642 anderson 13
    /**
14
     *
15
     * @var AdapterInterface
16
     */
17
    private $adapter;
18
 
19
 
20
    /**
21
     *
22
     * @var AbstractAdapter
23
     */
24
    private $cache;
25
 
26
    /**
27
     *
28
     * @var  LoggerInterface
29
     */
30
    private $logger;
31
 
32
    /**
33
     *
34
     * @var array
35
     */
36
    private $config;
37
 
38
    /**
39
     *
40
     * @param AdapterInterface $adapter
41
     * @param AbstractAdapter $cache
42
     * @param LoggerInterface $logger
43
     * @param array $config
44
     */
45
    public function __construct($adapter, $cache, $logger, $config)
46
    {
47
        $this->adapter      = $adapter;
48
        $this->cache        = $cache;
49
        $this->logger       = $logger;
50
        $this->config       = $config;
51
    }
15638 anderson 52
    // Define an action "world".
15639 anderson 53
    public function indexAction()
15638 anderson 54
    {
55
        // Get "message" from the query parameters.
56
        // In production code, it's a good idea to sanitize user input.
57
        $message = $this->params()->fromQuery('message', 'hello');
58
 
59
        // Pass variables to the view.
60
        return new ViewModel(['message' => $message]);
61
    }
62
}