<?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
* 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
*/
// 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());
*/
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;