in src/plugin/plugin_pdo.rs [55:83]
fn hook(
&self, class_name: Option<&str>, function_name: &str,
) -> Option<(
Box<crate::execute::BeforeExecuteHook>,
Box<crate::execute::AfterExecuteHook>,
)> {
match (class_name, function_name) {
(Some("PDO"), "__construct") => Some(self.hook_pdo_construct()),
(Some("PDO"), f)
if [
"exec",
"query",
"prepare",
"commit",
"begintransaction",
"rollback",
]
.contains(&f) =>
{
Some(self.hook_pdo_methods(function_name))
}
(Some("PDOStatement"), f)
if ["execute", "fetch", "fetchAll", "fetchColumn", "fetchObject"].contains(&f) =>
{
Some(self.hook_pdo_statement_methods(function_name))
}
_ => None,
}
}