/home/coolpkct/www/websites/cake3.cool.rocks/admin/plugins/library/libraryimage.inc.php
<?php
/**
* Part of Showkase web site management package
*
* @package Showkase
* @author Jack Hardie {@link http://www.jhardie.com}
* @copyright Copyright (c) 2012, SimpleViewer Inc.
*/
defined('SK_ACCESS')||die('<h1>403: Forbidden</h1>');
require_once 'classes'.DIRECTORY_SEPARATOR.'image.php';
/**
* Library Image
*
* @package Showkase
*/
class LibraryImage extends Image
{
/**
* @var string thumb path relative to gallery
*/
protected $thumbPathRelGallery = '';
/**
* Return image data in gallery exchange format
*
* @return array
*/
public function getImageData()
{
return array(
'title'=>'',
'description'=>'',
'imageUrl'=>$this->imageUrl,
'thumbUrl'=>'',
'imageLinkUrl'=>'',
'imageLinkTarget'=>'');
}
/**
* Create dom document to represent the image
* @return object
*/
public function getXml()
{
$dom = new domDocument('1.0', 'utf-8');
$rootElement = $dom->createElement('image');
$dom->appendChild($rootElement);
$urlElement = $dom->createElement('url');
$urlText = $dom->createTextNode( str_replace(array('\\', '/'), '/', $this->imagePathRelGallery));
$urlElement->appendChild($urlText);
$rootElement->appendChild($urlElement);
$widthElement = $dom->createElement('width');
$widthText = $dom->createTextNode($this->getWidth());
$widthElement->appendChild($widthText);
$rootElement->appendChild($widthElement);
$heightElement = $dom->createElement('height');
$heightText = $dom->createTextNode($this->getHeight());
$heightElement->appendChild($heightText);
$rootElement->appendChild($heightElement);
return $dom;
}
}