diff options
author | Fbenas <philbeansburton@gmail.com> | 2017-08-22 00:45:29 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2017-08-22 00:45:29 +0100 |
commit | 655c4f38241ab58a3404acb15a751f07dc1bca6a (patch) | |
tree | 7ae2cca93857025e4d83bf67600d47b4a5f20058 /src/Filesystem/Create.php | |
parent | 31ac8bccdae86eeb150cb396c44ee88427120e3e (diff) |
Complete refactor
Diffstat (limited to 'src/Filesystem/Create.php')
-rw-r--r-- | src/Filesystem/Create.php | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Filesystem/Create.php b/src/Filesystem/Create.php deleted file mode 100644 index 45b09fd..0000000 --- a/src/Filesystem/Create.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace App\Filesystem; - - -/** - * Base class for creating filesystem things - * - * @author Phil Burton <phil@d3r.com> - */ -abstract class Create -{ - /** - * Filename to create - * - * @var string - * @author Phil Burton <phil@d3r.com> - */ - protected $filename; - - /** - * Thing we're creating, used for messages - * - * @var string - * @author Phil Burton <phil@d3r.com> - */ - protected $thing; - - /** - * Set filename on object and check we can wirte to the Directory - * - * @param string $filename - * @author Phil Burton <phil@d3r.com> - */ - 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(); -} |