first working version
[phancap.git] / src / phancap / Image.php
diff --git a/src/phancap/Image.php b/src/phancap/Image.php
new file mode 100644 (file)
index 0000000..6750cfc
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+namespace phancap;
+
+class Image
+{
+    protected $config;
+    public $name;
+
+
+    public function __construct($name)
+    {
+        $this->name = $name;
+    }
+
+    public function getPath()
+    {
+        return $this->config->cacheDir . $this->name;
+    }
+
+    public function getUrl()
+    {
+        return $this->config->cacheDirUrl . $this->name;
+    }
+
+    public function setConfig(Config $config)
+    {
+        $this->config = $config;
+    }
+}
+?>
\ No newline at end of file