src/Micrometa/Infrastructure/Parser/JsonLD/VocabularyCache.php
protected function matchVocabularies($name, array $vocabularies, &$iri)
    {
        // Run through all vocabularies
        foreach ($vocabularies as $profile => $terms) {
            $profileLength = strlen($profile);

            // If the name matches the profile and the remaining string is a registered term
            if (!strncasecmp($profile, $name, $profileLength) && !empty($terms[substr($name, $profileLength)])) {
                $iri->profile = $profile;
                $iri->name    = substr($name, $profileLength);

                return;
            }
        }
    }
protected function matchVocabularies($name, array $vocabularies, &$iri)
    {
        // Run through all vocabularies
        foreach ($vocabularies as $profile => $terms) {
            $profileLength = strlen($profile);

            // If the name matches the profile and the remaining string is a registered term
            if (!strncasecmp($profile, $name, $profileLength) && !empty($terms[substr($name, $profileLength)])) {
                $iri->profile = $profile;
                $iri->name    = substr($name, $profileLength);

                return;
            }
        }
    }
protected function matchVocabularies ( $ name , array $ vocabularies , & $ iri ) { // Run through all vocabularies foreach ( $ vocabularies as $ profile => $ terms ) { $ profileLength = strlen ( $ profile ) ; // If the name matches the profile and the remaining string is a registered term if ( ! strncasecmp ( $ profile , $ name , $ profileLength ) && ! empty ( $ terms [ substr ( $ name , $ profileLength ) ] ) ) { $ iri -> profile = $ profile ; $ iri -> name = substr ( $ name , $ profileLength ) ; return ; } } }
Match a name with the known vocabularies

@param string $name        Name
@param array $vocabularies Vocabularies
@param \stdClass $iri      IRI
Match a name with the known vocabularies