芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/shimoda/lib/Widget/ModuleInterface.php
. */ namespace Xibo\Widget; use Jenssegers\Date\Date; use Xibo\Exception\XiboException; use Xibo\Factory\ModuleFactory; /** * Interface ModuleInterface * @package Xibo\Widget */ interface ModuleInterface { // Some Default Add/Edit/Delete functionality each module should have public function add(); public function edit(); public function delete(); // Return the name of the media as input by the user public function getName(); public function getSetting($setting, $default = NULL); /** * HTML Content to completely render this module. */ public function getTab($tab); public function preview($width, $height, $scaleOverride = 0); /** * Is the Module Valid * @return int (0 = No, 1 = Yes, 2 = Player Dependent */ public function isValid(); /** * Install or Upgrade this module * Expects $this->codeSchemaVersion to be set by the module. * @param ModuleFactory $moduleFactory */ public function installOrUpdate($moduleFactory); public function installModule(); public function settings(); /** * Get the Modified Date of this Widget * @param int $displayId The displayId, or 0 for preview * @return Date the date this widgets was modified */ public function getModifiedDate($displayId); /** * Get the Cache Date for this Widget using the cache key * @param int $displayId The displayId we're requesting for, or 0 for preview * @return Date */ public function getCacheDate($displayId); /** * Set the Cache Date using the cache key * @param int $displayId The displayId we're requesting for, or 0 for preview * @param int|null Override duration in seconds, otherwise the getCacheDuration is used. */ public function setCacheDate($displayId, $overrideDuration = null); /** * Get Cache Key * @param int $displayId The displayId we're requesting for, or 0 for preview * @return string */ public function getCacheKey($displayId); /** * Get the lock key for this widget. * should return the most unique lock key required to prevent concurrent access * normally the default is fine, unless the module fetches some external images * @return string */ public function getLockKey(); /** * Get Cache Duration * @return int the number of seconds the widget should be cached. */ public function getCacheDuration(); /** * Get Resource or Cache * @param int $displayId The displayId we're requesting for, or 0 for preview * @param \Xibo\Entity\Region|null $region * @return string * @throws XiboException */ public function getResourceOrCache($displayId, $region = null); /** * Get Resource * @param int $displayId The displayId we're requesting for, or 0 for preview * @return string */ public function getResource($displayId); }