public function set($active_ctx, $local_ctx, $result) {
    if(count($this->order) === $this->size) {
      $entry = array_shift($this->order);
      unset($this->cache->{$entry->activeCtx}->{$entry->localCtx});
    }
    $key1 = serialize($active_ctx);
    $key2 = serialize($local_ctx);
    $this->order[] = (object)array(
      'activeCtx' => $key1, 'localCtx' => $key2);
    if(!property_exists($this->cache, $key1)) {
      $this->cache->{$key1} = new stdClass();
    }
    $this->cache->{$key1}->{$key2} = JsonLdProcessor::copy($result);
  }
public function set($active_ctx, $local_ctx, $result) {
    if(count($this->order) === $this->size) {
      $entry = array_shift($this->order);
      unset($this->cache->{$entry->activeCtx}->{$entry->localCtx});
    }
    $key1 = serialize($active_ctx);
    $key2 = serialize($local_ctx);
    $this->order[] = (object)array(
      'activeCtx' => $key1, 'localCtx' => $key2);
    if(!property_exists($this->cache, $key1)) {
      $this->cache->{$key1} = new stdClass();
    }
    $this->cache->{$key1}->{$key2} = JsonLdProcessor::copy($result);
  }
public function set ( $ active_ctx , $ local_ctx , $ result ) { if ( count ( $ this -> order ) === $ this -> size ) { $ entry = array_shift ( $ this -> order ) ; unset ( $ this -> cache -> { $ entry -> activeCtx } -> { $ entry -> localCtx } ) ; } $ key1 = serialize ( $ active_ctx ) ; $ key2 = serialize ( $ local_ctx ) ; $ this -> order [ ] = ( object ) array ( 'activeCtx' => $ key1 , 'localCtx' => $ key2 ) ; if ( ! property_exists ( $ this -> cache , $ key1 ) ) { $ this -> cache -> { $ key1 } = new stdClass ( ) ; } $ this -> cache -> { $ key1 } -> { $ key2 } = JsonLdProcessor :: copy ( $ result ) ; }
Sets an active context in the cache based on the previous active
context and the just-processed local context.

@param stdClass $active_ctx the previous active context.
@param stdClass $local_ctx the just-processed local context.
@param stdClass $result the resulting active context.
Sets an active context in the cache based on the previous active context and the just - processed local context .