src/Micrometa/Infrastructure/Parser/JsonLD/VocabularyCache.php
protected function processContext(array $context)
    {
        $prefices        = [];
        $vocabularyCache = Cache::getAdapter()->getItem(self::SLOT_VOCABS);
        $vocabularies    = $vocabularyCache->isHit() ? $vocabularyCache->get() : [];

        // Run through all vocabulary terms
        foreach ($context as $name => $definition) {
            // Skip JSON-LD reserved terms
            if ($this->isReservedTokens($name, $definition)) {
                continue;
            }

            // Process this prefix / vocabulary term
            $this->processPrefixVocabularyTerm($name, $definition, $prefices, $vocabularies);
        }

        $vocabularyCache->set($vocabularies);
        Cache::getAdapter()->save($vocabularyCache);
    }
protected function processContext(array $context)
    {
        $prefices        = [];
        $vocabularyCache = Cache::getAdapter()->getItem(self::SLOT_VOCABS);
        $vocabularies    = $vocabularyCache->isHit() ? $vocabularyCache->get() : [];

        // Run through all vocabulary terms
        foreach ($context as $name => $definition) {
            // Skip JSON-LD reserved terms
            if ($this->isReservedTokens($name, $definition)) {
                continue;
            }

            // Process this prefix / vocabulary term
            $this->processPrefixVocabularyTerm($name, $definition, $prefices, $vocabularies);
        }

        $vocabularyCache->set($vocabularies);
        Cache::getAdapter()->save($vocabularyCache);
    }
protected function processContext ( array $ context ) { $ prefices = [ ] ; $ vocabularyCache = Cache :: getAdapter ( ) -> getItem ( self :: SLOT_VOCABS ) ; $ vocabularies = $ vocabularyCache -> isHit ( ) ? $ vocabularyCache -> get ( ) : [ ] ; // Run through all vocabulary terms foreach ( $ context as $ name => $ definition ) { // Skip JSON-LD reserved terms if ( $ this -> isReservedTokens ( $ name , $ definition ) ) { continue ; } // Process this prefix / vocabulary term $ this -> processPrefixVocabularyTerm ( $ name , $ definition , $ prefices , $ vocabularies ) ; } $ vocabularyCache -> set ( $ vocabularies ) ; Cache :: getAdapter ( ) -> save ( $ vocabularyCache ) ; }
Process a context vocabulary

@param array $context Context
Process a context vocabulary