server/src/app/Libraries/CocoonUtils.php
changeset 19 eadaf0b8f02e
parent 18 f2a40bbc27f6
child 20 a9b98b16b053
equal deleted inserted replaced
18:f2a40bbc27f6 19:eadaf0b8f02e
     8      *
     8      *
     9      * @return string
     9      * @return string
    10      */
    10      */
    11     public static function getIdFromUri($uri) {
    11     public static function getIdFromUri($uri) {
    12         return substr($uri, strlen(config('corpusparole.cocoon_doc_id_base_uri')));
    12         return substr($uri, strlen(config('corpusparole.cocoon_doc_id_base_uri')));
       
    13     }
       
    14 
       
    15     /**
       
    16      * Extract id form corpus url.
       
    17      *
       
    18      * @return string
       
    19      */
       
    20     public static function getIdFromCorpusUri($uri) {
       
    21         return substr($uri, strlen(config('corpusparole.corpus_doc_id_base_uri')));
    13     }
    22     }
    14 
    23 
    15     /**
    24     /**
    16      * Create a Corpus resource id (purl url)
    25      * Create a Corpus resource id (purl url)
    17      *
    26      *