1: <?php
2: /**
3: * Sastrawi (https://github.com/sastrawi/sastrawi)
4: *
5: * @link http://github.com/sastrawi/sastrawi for the canonical source repository
6: * @license https://github.com/sastrawi/sastrawi/blob/master/LICENSE The MIT License (MIT)
7: */
8:
9: namespace Sastrawi\Stemmer\Context;
10:
11: /**
12: * Standard implementation of Removal Interface.
13: */
14: class Removal implements RemovalInterface
15: {
16: /**
17: * @var \Sastrawi\Stemmer\Context\Visitor\VisitorInterface
18: */
19: protected $visitor;
20:
21: /**
22: * @var string
23: */
24: protected $subject;
25:
26: /**
27: * @var string
28: */
29: protected $result;
30:
31: /**
32: * @var string
33: */
34: protected $removedPart;
35:
36: /**
37: * @var string
38: */
39: protected $affixType;
40:
41: /**
42: * @param \Sastrawi\Stemmer\Context\Visitor\VisitorInterface $visitor
43: * @param string $subject
44: * @param string $result
45: * @param string $removedPart
46: * @param string $affixType
47: */
48: public function __construct(
49: Visitor\VisitorInterface $visitor,
50: $subject,
51: $result,
52: $removedPart,
53: $affixType
54: ) {
55: $this->visitor = $visitor;
56: $this->subject = $subject;
57: $this->result = $result;
58: $this->removedPart = $removedPart;
59: $this->affixType = $affixType;
60: }
61:
62: public function getVisitor()
63: {
64: return $this->visitor;
65: }
66:
67: public function getSubject()
68: {
69: return $this->subject;
70: }
71:
72: public function getResult()
73: {
74: return $this->result;
75: }
76:
77: public function getRemovedPart()
78: {
79: return $this->removedPart;
80: }
81:
82: public function getAffixType()
83: {
84: return $this->affixType;
85: }
86: }
87: