aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/Logger/CallBase.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/callnotifier/Logger/CallBase.php')
-rw-r--r--src/callnotifier/Logger/CallBase.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/callnotifier/Logger/CallBase.php b/src/callnotifier/Logger/CallBase.php
new file mode 100644
index 0000000..8bd143c
--- /dev/null
+++ b/src/callnotifier/Logger/CallBase.php
@@ -0,0 +1,19 @@
+<?php
+namespace callnotifier;
+
+abstract class Logger_CallBase implements Logger
+{
+ protected function addUnsetVars($call)
+ {
+ static $expectedVars = array(
+ 'toName', 'fromName', 'toLocation', 'fromLocation'
+ );
+ foreach ($expectedVars as $varName) {
+ if (!isset($call->$varName)) {
+ $call->$varName = null;
+ }
+ }
+ }
+}
+
+?>