begin work on call detaillers (load name from ldap, load location from opengeodb)
[auerswald-callnotifier.git] / src / callnotifier / CallMonitor / Detailler / LDAP.php
diff --git a/src/callnotifier/CallMonitor/Detailler/LDAP.php b/src/callnotifier/CallMonitor/Detailler/LDAP.php
new file mode 100644 (file)
index 0000000..833fd46
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+namespace callnotifier;
+
+class CallMonitor_Detailler_LDAP implements CallMonitor_Detailler
+{
+    public function __construct()
+    {
+    }
+
+    public function loadCallDetails(CallMonitor_Call $call)
+    {
+        if ($call->type == CallMonitor_Call::INCOMING) {
+            $call->fromName = $this->loadName($call->from);
+        } else {
+            $call->toName = $this->loadName($call->to);
+        }
+    }
+
+    protected function loadName($number)
+    {
+        return 'foo';
+    }
+
+}
+
+?>