summaryrefslogtreecommitdiff
path: root/src/Message/Overview.php
blob: 0494c169b9e61a453223bb7c586cdd0301019ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php

namespace App\Message;

use App\Message\Base;

/**
 * Overview message
 *
 * @author Phil Burton <phil@pgburton.com>
 */
class Overview extends Base
{
    /**
     * Message name to load
     *
     * @var string
     */
    protected $message_name;

    /**
     * The list of vars we need to inject
     *
     * @var array
     */
    protected $injects = ['inject', 'second'];

    /**
     * The array of important vars
     *
     * @var string
     */
    protected $important = ['inject'];

    /**
     * Inject
     * @var string
     */
    public $inject;

    /**
     * Second inject
     *
     * @var string
     */
    public $second = "second";

    /**
     * Construct to set any inject vars from functions if required
     *
     * @author Phil Burton <phil@pgburton.com>
     */
    public function __construct()
    {
        $this->inject = $this->getInject();
        parent::__construct();
    }

    /**
     * Get our inject value
     *
     * @author Phil Burton <phil@pgburton.com>
     * @return string
     */
    public function getInject()
    {
        return (string) time();
    }
}