server/src/app/Models/WebResource.php
changeset 169 8fddc113095e
parent 168 17f10b56c079
equal deleted inserted replaced
168:17f10b56c079 169:8fddc113095e
    14     public function __construct(...$args) {
    14     public function __construct(...$args) {
    15         list($uri, $graph) = $args;
    15         list($uri, $graph) = $args;
    16         parent::__construct($uri, $graph);
    16         parent::__construct($uri, $graph);
    17     }
    17     }
    18 
    18 
    19     private $format = -1;
    19     private $format = false;
    20 
    20 
    21     abstract protected function doClearMemoizationCache();
    21     abstract protected function doClearMemoizationCache();
    22 
    22 
    23     public function clearMemoizationCache() {
    23     public function clearMemoizationCache() {
    24         $this->format = -1;
    24         $this->format = false;
    25         $this->doClearMemoizationCache();
    25         $this->doClearMemoizationCache();
    26     }
    26     }
    27 
    27 
    28     public function getFormat() {
    28     public function getFormat() {
    29         if($this->format === -1) {
    29         if($this->format === false) {
    30             $format = $this->getLiteral("<http://purl.org/dc/elements/1.1/format>");
    30             $format = $this->getLiteral("<http://purl.org/dc/elements/1.1/format>");
    31             $this->format = is_null($format)?null:$format->getValue();
    31             $this->format = is_null($format)?null:$format->getValue();
    32         }
    32         }
    33         return $this->format;
    33         return $this->format;
    34     }
    34     }