Source of file CloudImageCachedStore.php
Size: 1,283 Bytes - Last Modified: 2021-12-23T10:03:12+00:00
/var/www/docs.ssmods.com/process/src/code/wrappers/CloudImageCachedStore.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | <?php /** * Stores information about size, dimensions, and state of formatted (cached) * images in a separate table so they don't show up in the assets manager * in the CMS, but can still be used in redundant environments and across * cache clears. * * @author Mark Guinn <mark@adaircreative.com> * @date 02.05.2014 * @package cloudassets * @subpackage wrappers */ /** * Class CloudImageCachedStore */ class CloudImageCachedStore extends DataObject { private static $db = array( 'Filename' => 'Varchar(255)', 'CloudStatus' => "Enum('Local,Live,Error','Local')", 'CloudSize' => 'Int', 'CloudMetaJson' => 'Text', // saves any bucket or file-type specific information ); private static $has_one = array( 'Source' => 'CloudImage', ); private static $indexes = array( 'Filename' => true, ); /** * Constructs an image record that can be used with this meta data * @return CloudImageCached */ public function getCloudImageCached() { $cached = new CloudImageCached($this->Filename); $cached->Title = $this->Title; $cached->ParentID = $this->ParentID; $cached->setStoreRecord($this); return $cached; } } |