summaryrefslogtreecommitdiff
path: root/src/Script/Input.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Script/Input.php')
-rw-r--r--src/Script/Input.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Script/Input.php b/src/Script/Input.php
index 772bb8c..6a91a72 100644
--- a/src/Script/Input.php
+++ b/src/Script/Input.php
@@ -6,6 +6,8 @@ use Exception;
/**
* Input handler for CLI arugments and options
+ *
+ * @author Phil Burton <phil@pgburton.com>
*/
class Input
{
@@ -21,6 +23,16 @@ class Input
*/
protected $shortOpts = 'f:d::t::l::c::';
+ /**
+ * Available CLI options
+ * f filename - input file with the vendors data
+ * d day - delivery day (dd/mm/yy)
+ * t time - delivery time in 24h format (hh:mm)
+ * l location - delivery location (postcode without spaces, e.g. NW43QB)
+ * c covers - number of people to feed
+ *
+ * @var string
+ */
protected $longOpts = [
'filename:',
'day::',
@@ -48,6 +60,7 @@ class Input
/**
* Load options, make sure required options are set
+ * Throw an exception if input data is badly formatted
*
* @author Phil Burton <phil@pgburton.com>
*/