Lines Matching +full:add +full:- +full:matcher
16 const MATCHER_NAME = 'MATCHER';
31 ->createRequest()
32 ->setQueryParametrized('delete from PAGE_RULES where id = ?', [$ruleId]);
34 $request->execute();
36 … LogUtility::msg("Something went wrong when deleting the redirections. {$e->getMessage()}");
38 $request->close();
55 ->createRequest()
56 ->setQueryParametrized("SELECT count(*) FROM PAGE_RULES where ID = ?", [$id]);
60 ->execute()
61 ->getFirstCellValueAsInt();
63 LogUtility::msg("Error during pattern exist statement. {$e->getMessage()}");
66 $request->close();
84 ->createRequest()
85 ->setQueryParametrized("SELECT count(*) FROM PAGE_RULES where MATCHER = ?", [$pattern]);
88 $count = $request->execute()
89 ->getFirstCellValueAsInt();
91 LogUtility::msg("Error during pattern exists query: {$e->getMessage()}");
94 $request->close();
107 * @return int - the rule id
112 return $this->addRuleWithDate($sourcePageId, $targetPageId, $priority, $currentDate);
116 * Add Redirection
119 * @param string $matcher
123 * @return int - the last id
125 function addRuleWithDate($matcher, $target, $priority, $creationDate): ?int argument
131 'matcher' => $matcher,
136 ->createRequest()
137 ->setTableRow('PAGE_RULES', $entry);
140 $lastInsertId = $request->execute()
141 ->getInsertId();
143 LogUtility::msg("There was a problem during Pages Rule insertion. " . $e->getMessage());
146 $request->close();
153 function updateRule($id, $matcher, $target, $priority) argument
158 $matcher,
165 …$statement = 'update PAGE_RULES set matcher = ?, target = ?, priority = ?, timestamp = ? where id …
168 ->createRequest()
169 ->setQueryParametrized($statement, $entry);
174 $request->execute();
176 …LogUtility::error("There was a problem during the page rules update. Error: {$e->getMessage()}", s…
178 $request->close();
193 ->createRequest()
194 ->setQuery("delete from PAGE_RULES");
196 $request->execute();
198 LogUtility::msg('Errors during delete of all redirections. ' . $e->getMessage());
200 $request->close();
214 ->createRequest()
215 ->setQuery("select count(1) from PAGE_RULES");
219 $count = $request->execute()
220 ->getFirstCellValueAsInt();
222 LogUtility::msg("Page Rules Count. {$e->getMessage()}");
225 $request->close();
240 ->createRequest()
241 ->setQuery("select * from PAGE_RULES order by PRIORITY");
244 return $request->execute()
245 ->getRows();
247 LogUtility::msg("Errors during select of all Page rules. {$e->getMessage()}");
250 $request->close();
259 ->createRequest()
260 ->setQueryParametrized("SELECT * FROM PAGE_RULES where ID = ?", [$id]);
262 return $request->execute()
263 ->getFirstRow();
265 LogUtility::msg("getRule Error {$e->getMessage()}");
268 $request->close();