Rewritten:
[core.git] / framework / main / classes / images / extended / class_PngImage.php
index fbf444ca187118c323e4a2b67e9cacd839dbc6bd..4609960d3ee8102f3a7498c980f8e2e03641f03b 100644 (file)
@@ -6,6 +6,9 @@ namespace CoreFramework\Image;
 use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Template\CompileableTemplate;
 
 use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Template\CompileableTemplate;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A PNG image generator
  *
 /**
  * A PNG image generator
  *
@@ -63,22 +66,26 @@ class PngImage extends BaseImage {
         * Finish this image by producing it
         *
         * @return      void
         * Finish this image by producing it
         *
         * @return      void
+        * @todo Rewrite this to SplFileInfo/Object
         */
        public function finishImage () {
         */
        public function finishImage () {
+               $this->partialStub('Unfinished method.');
+               return;
+
                // Call parent method
                parent::finishImage();
 
                // Get a file name for our image
                // Call parent method
                parent::finishImage();
 
                // Get a file name for our image
-               $cacheFile = $this->getTemplateInstance()->getImageCacheFqfn();
+               $cacheFile = $this->getTemplateInstance()->getImageCacheFile();
 
                // Does it exist?
                if (FrameworkBootstrap::isReadableFile($cacheFile)) {
                        // Remove it
 
                // Does it exist?
                if (FrameworkBootstrap::isReadableFile($cacheFile)) {
                        // Remove it
-                       @unlink($cacheFile);
+                       unlink($cacheFile->getPathname());
                } // END - if
 
                // Finish the image and send it to a cache file
                } // END - if
 
                // Finish the image and send it to a cache file
-               imagepng($this->getImageResource(), $cacheFile, 9, PNG_ALL_FILTERS);
+               imagepng($this->getImageResource(), $cacheFile->getPathname(), 9, PNG_ALL_FILTERS);
        }
 
 }
        }
 
 }