summaryrefslogtreecommitdiff
path: root/lib/Kolab/FreeBusy/SourceFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/FreeBusy/SourceFile.php')
-rw-r--r--lib/Kolab/FreeBusy/SourceFile.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/Kolab/FreeBusy/SourceFile.php b/lib/Kolab/FreeBusy/SourceFile.php
index 0cdaf02..29840a6 100644
--- a/lib/Kolab/FreeBusy/SourceFile.php
+++ b/lib/Kolab/FreeBusy/SourceFile.php
@@ -1,19 +1,26 @@
<?php
-namespace Kolab;
+namespace Kolab\FreeBusy;
/**
- *
+ * Implementation of a Free/Busy data source reading from the local file system
*/
-class FBSourceFile extends FBSource
+class SourceFile extends Source
{
/**
- * @see FBSource::getFreeBusyData()
+ * @see Source::getFreeBusyData()
*/
public function getFreeBusyData($user, $extended)
{
+ // get source config with placeholders replaced
$config = $this->getUserConfig($user);
- // TODO: implement this
+ // deliver file contents if found
+ if (is_readable($config['path'])) {
+ return file_get_contents($config['path']);
+ }
+
+ // not found
+ return false;
}
}