Completed
Push — master ( 0f7643...7f9410 )
by Joshua
8s
created

PreQueryArguments::getMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace As3\Modlr\Store\Events;
4
5
use As3\Modlr\Events\EventArguments;
6
use As3\Modlr\Metadata\EntityMetadata;
7
use As3\Modlr\Persister\PersisterInterface;
8
use As3\Modlr\Store\Store;
9
10
/**
11
 * Pre-query event args.
12
 *
13
 * @author Jacob Bare <[email protected]>
14
 */
15
class PreQueryArguments extends EventArguments
16
{
17
    /**
18
     * @var array
19
     */
20
    private $criteria;
21
22
    /**
23
     * @var EntityMetadata
24
     */
25
    private $metadata;
26
27
    /**
28
     * @var PersisterInterface
29
     */
30
    private $persister;
31
32
    /**
33
     * @var Store
34
     */
35
    private $store;
36
37
    /**
38
     * Constructor.
39
     *
40
     * @param   Store               $store
41
     * @param   PersisterInterface  $persister
42
     * @param   array               $criteria
43
     */
44
    public function __construct(EntityMetadata $metadata, Store $store, PersisterInterface $persister, array &$criteria)
45
    {
46
        $this->metadata = $metadata;
47
        $this->store = $store;
48
        $this->persister = $persister;
49
        $this->criteria = &$criteria;
50
    }
51
52
    /**
53
     * Gets the metadata.
54
     *
55
     * @return  EntityMetadata
56
     */
57
    public function getMetadata()
58
    {
59
        return $this->metadata;
60
    }
61
62
    /**
63
     * Gets the persister.
64
     *
65
     * @return  PersisterInterface
66
     */
67
    public function getPersister()
68
    {
69
        return $this->persister;
70
    }
71
72
    /**
73
     * Gets the store.
74
     *
75
     * @return  Store
76
     */
77
    public function getStore()
78
    {
79
        return $this->store;
80
    }
81
82
    /**
83
     * Gets the criteria (by reference) so it can be manipulated.
84
     *
85
     * @return  array
86
     */
87
    public function &getCriteria()
88
    {
89
        return $this->criteria;
90
    }
91
}
92