server/src/app/Models/DocumentBase.php
changeset 445 b1e5ad6b2a29
parent 326 226d5b17a119
child 502 74fba571487e
equal deleted inserted replaced
444:63e798616b6a 445:b1e5ad6b2a29
   147                 $this->created = null;
   147                 $this->created = null;
   148             }
   148             }
   149         }
   149         }
   150         return $this->created;
   150         return $this->created;
   151     }
   151     }
       
   152 
       
   153     public function getCreatedValue() {
       
   154         $created = $this->getCreated();
       
   155         return is_null($created)?null:$created->getValue();
       
   156     }
       
   157 
   152 
   158 
   153     public function getModified() {
   159     public function getModified() {
   154         if($this->modified === false) {
   160         if($this->modified === false) {
   155             try {
   161             try {
   156                 $this->modified = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/modified>");
   162                 $this->modified = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/modified>");
   199                 'id' => $this->getId(),
   205                 'id' => $this->getId(),
   200                 'uri' => $this->getUri(),
   206                 'uri' => $this->getUri(),
   201                 'title' => $this->getTitleValue(),
   207                 'title' => $this->getTitleValue(),
   202                 'languages' => $this->getLanguagesValue(),
   208                 'languages' => $this->getLanguagesValue(),
   203                 'modified' => $this->getModifiedValue(),
   209                 'modified' => $this->getModifiedValue(),
   204                 'issued' => $this->getIssuedValue()            ];
   210                 'issued' => $this->getIssuedValue(),
       
   211                 'created' => $this->getCreatedValue()
       
   212             ];
   205 
   213 
   206             if($this->languagesResolved) {
   214             if($this->languagesResolved) {
   207                 $res['languages_resolved'] = $this->getLanguagesResolved();
   215                 $res['languages_resolved'] = $this->getLanguagesResolved();
   208             }
   216             }
   209 
   217