]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/images/class_BaseImage.php
Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / images / class_BaseImage.php
index da592594346e7579bbdc25836013909678c894d2..e83375f9953c95608efa99ef07d3638f89c05cb5 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 // Own namespace
-namespace CoreFramework\Image;
+namespace Org\Mxchange\CoreFramework\Image;
 
 // Import framework stuff
-use CoreFramework\Object\BaseFrameworkSystem;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
  * A general image class
@@ -28,7 +28,7 @@ use CoreFramework\Registry\Registerable;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class BaseImage extends BaseFrameworkSystem implements Registerable {
+abstract class BaseImage extends BaseFrameworkSystem implements Registerable {
        /**
         * Image type
         */
@@ -528,7 +528,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
                                // Walk through all groups
                                foreach ($templateInstance->getVariableGroups() as $group => $set) {
                                        // Set the group
-                                       $templateInstance->setVariableGroup($group, FALSE);
+                                       $templateInstance->setVariableGroup($group, false);
 
                                        // Compile image string
                                        $imageString = $templateInstance->compileRawCode($this->getString());
@@ -555,10 +555,16 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
         */
        public function getContent () {
                // Get cache file name
-               $cacheFile = $this->getTemplateInstance()->getImageCacheFqfn();
+               $cacheFile = $this->getTemplateInstance()->getImageCacheFile();
+
+               // Open it for reading
+               $fileObject = $cacheFile->openFile('r');
+
+               // Rewind to beginning
+               $fileObject->rewind();
 
                // Load the content
-               $imageContent = file_get_contents($cacheFile);
+               $imageContent = $fileObject->fread($cacheFile->getSize());
 
                // And return it
                return $imageContent;