1<?php 2 3 4namespace ComboStrap; 5 6/** 7 * Class TemplateStore 8 * @package ComboStrap 9 * The data goes from and out of a template format 10 */ 11class TemplateStore extends MetadataStoreAbs implements MetadataStore 12{ 13 14 const CANONICAL = "template"; 15 16 public function set(Metadata $metadata) 17 { 18 LogUtility::msg("You can't set a value with a template store"); 19 } 20 21 public function get(Metadata $metadata, $default = null) 22 { 23 LogUtility::msg("You can't get a value with a template store"); 24 } 25 26 27 public function getFromPersistentName(string $name, $default = null) 28 { 29 LogUtility::msg("You can't get a value with a template store"); 30 } 31 32 public function setFromPersistentName(string $name, $value) 33 { 34 LogUtility::msg("You can't set a value with a template store"); 35 } 36 37 public function persist() 38 { 39 LogUtility::msg("You can't persist with a template store"); 40 } 41 42 public function isHierarchicalTextBased(): bool 43 { 44 return true; 45 } 46 47 public function reset() 48 { 49 LogUtility::msg("Reset: The template format is not yet implemented"); 50 } 51 52 public function getCanonical(): string 53 { 54 return self::CANONICAL; 55 } 56 57 static function getOrCreateFromResource(ResourceCombo $resourceCombo): MetadataStore 58 { 59 return new TemplateStore($resourceCombo); 60 } 61} 62