*/ class CreateFile extends Create { /** * Thing we're creating * * @author Phil Burton */ protected $thing = "file"; /** * Check if the file already exists * * @param string $filename * @author Phil Burton */ public function __construct(string $filename) { parent::__construct($filename); if (file_exists($filename)) { throw new \Exception('File already exists at: ' . $filename); } } /** * Create the new file * * @author Phil Burton */ public function excecute() { echo "execute"; } }