Permalink
Browse files

Adding some forgotten commenting on HelperOutput

  • Loading branch information...
1 parent e589c2b commit 0c8e9480d0a6da48177c3e7cb3bab6105af3d76e @enygma committed Nov 3, 2010
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/Helper/HelperOutput.php
@@ -98,7 +98,7 @@ public static function asCsv($outputData)
*/
public static function asXml($outputData)
{
- return 'not implemented';
+ return 'XML output formatting not yet implemented';
}
/**
@@ -112,6 +112,14 @@ public static function asJson($outputData)
return json_encode($outputData);
}
+ /**
+ * Write the output data into a file - checks for permissions too
+ *
+ * @param string $fullPath Full path, including filename, to write to
+ * @param string $outputData Text data to write to the file
+ * @return void
+ * @throws Exception
+ */
public static function writeToFile($fullPath,$outputData)
{
if(is_file($fullPath)){
@@ -121,7 +129,6 @@ public static function writeToFile($fullPath,$outputData)
if($directoryResource = opendir($directoryPath)){
file_put_contents($fullPath,$outputData);
-
}else{
throw new Exception('Cannot write to location: '.$directoryPath);
}

0 comments on commit 0c8e948

Please sign in to comment.