diff options
author | Fbenas <philbeansburton@gmail.com> | 2017-08-20 04:18:13 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2017-08-20 04:18:13 +0100 |
commit | 0ed82a2c6ffd8e981d9dd388306379941ecb5720 (patch) | |
tree | 52c7d66149a93c7d4d8038d356bb0107bad09766 /src/Filesystem/Create.php | |
parent | 048634fd8a65d37f21bcb3a34161f74be6aef95d (diff) |
WIP rejigging stuff
Diffstat (limited to 'src/Filesystem/Create.php')
-rw-r--r-- | src/Filesystem/Create.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Filesystem/Create.php b/src/Filesystem/Create.php new file mode 100644 index 0000000..a1891db --- /dev/null +++ b/src/Filesystem/Create.php @@ -0,0 +1,20 @@ +<?php + +namespace App\Filesystem; + +abstract class Create +{ + protected $filename; + protected $thing; + + public function __construct(string $filename) + { + $this->filename = $filename; + + if (!is_writable(dirname($filename))) { + throw new \Exception('Cannot create ' . $this->thing . ' at: ' . $filename); + } + } + + abstract public function excecute(); +} |