1 | <?php |
||
34 | class MessageMonitor implements MonitorInterface |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The target counter for monitoring the message. |
||
39 | * |
||
40 | * @var integer |
||
41 | */ |
||
42 | protected $target = 0; |
||
43 | |||
44 | /** |
||
45 | * The row counter for monitoring the message. |
||
46 | * |
||
47 | * @var integer |
||
48 | */ |
||
49 | protected $rowCount = 0; |
||
50 | |||
51 | /** |
||
52 | * The log message for monitoring the message. |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $logMessage = ''; |
||
57 | |||
58 | /** |
||
59 | * Initializes the queue with the name to use. |
||
60 | * |
||
61 | * @param int $target The target |
||
62 | * @param string $logMessage Holds the queue name to use |
||
63 | */ |
||
64 | public function __construct($target, $logMessage) |
||
69 | |||
70 | /** |
||
71 | * Sets the log message. |
||
72 | * |
||
73 | * @param string $logMessage The log message |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | public function setLogMessage($logMessage) |
||
81 | |||
82 | /** |
||
83 | * Returns the row counter. |
||
84 | * |
||
85 | * @param integer $rowCount The row counter |
||
86 | * |
||
87 | * @return void |
||
88 | */ |
||
89 | public function setRowCount($rowCount) |
||
93 | |||
94 | /** |
||
95 | * Returns the log message. |
||
96 | * |
||
97 | * @return string The log message |
||
98 | */ |
||
99 | public function getLogMessage() |
||
103 | |||
104 | /** |
||
105 | * Returns the row counter. |
||
106 | * |
||
107 | * @return integer The row counter |
||
108 | */ |
||
109 | public function getRowCount() |
||
113 | |||
114 | /** |
||
115 | * Returns the target counter. |
||
116 | * |
||
117 | * @return integer The target counter |
||
118 | */ |
||
119 | public function getTarget() |
||
123 | } |
||
124 |