1: | <?php
2: | namespace Opencart\Catalog\Model\Cms;
3: | /**
4: | * Class Anti-Spam
5: | *
6: | * @package Opencart\Catalog\Model\Cms
7: | */
8: | class Antispam extends \Opencart\System\Engine\Model {
9: | /**
10: | * Get Spam
11: | *
12: | * @param string $comment
13: | *
14: | * @return int
15: | */
16: | public function getSpam(string $comment): int {
17: | $query = $this->db->query("SELECT COUNT(*) AS `total` FROM `" . DB_PREFIX . "antispam` WHERE '" . $this->db->escape(str_replace(' ', '', $comment)) . "' LIKE CONCAT('%', `keyword`, '%')");
18: |
19: | return (int)$query->row['total'];
20: | }
21: | }
22: |

OpenCart API API documentation generated by ApiGen dev-master