Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 14
ConceptNamespaces
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
12
0.00% covered (danger)
0.00%
0 / 14
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 getLocal
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 11
<?php
namespace MediaWiki\Extension\WikibaseManifest;
use Wikibase\Repo\Rdf\RdfVocabulary;
class ConceptNamespaces {
    private $localEntitySource;
    private $rdfVocabulary;
    public function __construct( $localEntitySource, RdfVocabulary $rdfVocabulary ) {
        $this->localEntitySource = $localEntitySource;
        $this->rdfVocabulary = $rdfVocabulary;
    }
    public function getLocal() {
        $rdfVocabulary = $this->rdfVocabulary;
        $dataNamespaces = [ RdfVocabulary::NS_DATA => $rdfVocabulary->dataNamespaceNames['local'] ];
        $entityNamespaces = [ RdfVocabulary::NS_ENTITY => $rdfVocabulary->entityNamespaceNames['local'] ];
        $propertyNamespaces = $rdfVocabulary->propertyNamespaceNames['local'];
        $statementNamespaces = $rdfVocabulary->statementNamespaceNames['local'];
        $relevant_ns = array_merge(
            $entityNamespaces,
            $dataNamespaces,
            $statementNamespaces,
            $propertyNamespaces
        );
        $result = [];
        foreach ( $relevant_ns as $key => $value ) {
            $result[$key] = $rdfVocabulary->getNamespaceURI( $value );
        }
        return $result;
    }
}