private function generateDeleteBy(Finder $finder, Entity $entity) { $result = "\tpublic function {$finder->getDeleteByMethodSignature()} {\n" . "\t\t\$whereClause = \"" . implode(" AND ", $finder->getWhereClauses()) . "\";\n"; $result .= "\t\t\$this->db->updateQuery(\"DELETE FROM \".self::TABLE.\" WHERE \$whereClause\");\n" . "\t\tparent::\$dbCache->resetEntity(\"{$entity->getName()}\");\n\t}\n\n"; return $result; }