From 72f36fce442a50c1da686059930fa6ab8ca37186 Mon Sep 17 00:00:00 2001 From: Marek Fojtl Date: Fri, 22 Oct 2021 14:50:21 +0200 Subject: [PATCH] first commit --- composer.json | 16 ++++++++++++++++ src/APackage.php | 17 +++++++++++++++++ src/IPackage.php | 16 ++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 composer.json create mode 100644 src/APackage.php create mode 100644 src/IPackage.php diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..0558d7e --- /dev/null +++ b/composer.json @@ -0,0 +1,16 @@ +{ + "name": "polyweb-cz/attachment-sdk", + "description": "Attachment development kit", + "version": "0.0.1", + "require": { + "php": ">=8.0" + }, + "autoload": { + "psr-4": { + "PolyWeb\\Attachment\\Sdk\\": "src" + } + }, + "autoload-dev": { + "classmap": ["src/"] + } +} diff --git a/src/APackage.php b/src/APackage.php new file mode 100644 index 0000000..1cb87d4 --- /dev/null +++ b/src/APackage.php @@ -0,0 +1,17 @@ +getWorkDirectory() . '/' . $name; + if (!file_exists($path)) { + throw new \Exception('Attachment "' . $name . '" does not exist in "' . $this->getWorkDirectory() . '"'); + } + return $path; + } +} \ No newline at end of file diff --git a/src/IPackage.php b/src/IPackage.php new file mode 100644 index 0000000..8d88fa7 --- /dev/null +++ b/src/IPackage.php @@ -0,0 +1,16 @@ +