private function expandValue($value, $activectx, $activeprty)
    {
        $def = $this->getPropertyDefinition($activectx, $activeprty);

        $result = new JsonObject();

        if ('@id' === $def['@type']) {
            $result->{'@id'} = $this->expandIri($value, $activectx, true);
        } elseif ('@vocab' === $def['@type']) {
            $result->{'@id'} = $this->expandIri($value, $activectx, true, true);
        } else {
            $result->{'@value'} = $value;

            if (isset($def['@type'])) {
                $result->{'@type'} = $def['@type'];
            } elseif (isset($def['@language']) && is_string($result->{'@value'})) {
                $result->{'@language'} = $def['@language'];
            }
        }

        return $result;
    }
private function expandValue($value, $activectx, $activeprty)
    {
        $def = $this->getPropertyDefinition($activectx, $activeprty);

        $result = new JsonObject();

        if ('@id' === $def['@type']) {
            $result->{'@id'} = $this->expandIri($value, $activectx, true);
        } elseif ('@vocab' === $def['@type']) {
            $result->{'@id'} = $this->expandIri($value, $activectx, true, true);
        } else {
            $result->{'@value'} = $value;

            if (isset($def['@type'])) {
                $result->{'@type'} = $def['@type'];
            } elseif (isset($def['@language']) && is_string($result->{'@value'})) {
                $result->{'@language'} = $def['@language'];
            }
        }

        return $result;
    }
private function expandValue ( $ value , $ activectx , $ activeprty ) { $ def = $ this -> getPropertyDefinition ( $ activectx , $ activeprty ) ; $ result = new JsonObject ( ) ; if ( '@id' === $ def [ '@type' ] ) { $ result -> { '@id' } = $ this -> expandIri ( $ value , $ activectx , true ) ; } elseif ( '@vocab' === $ def [ '@type' ] ) { $ result -> { '@id' } = $ this -> expandIri ( $ value , $ activectx , true , true ) ; } else { $ result -> { '@value' } = $ value ; if ( isset ( $ def [ '@type' ] ) ) { $ result -> { '@type' } = $ def [ '@type' ] ; } elseif ( isset ( $ def [ '@language' ] ) && is_string ( $ result -> { '@value' } ) ) { $ result -> { '@language' } = $ def [ '@language' ] ; } } return $ result ; }
Expands a scalar value

@param mixed  $value      The value to expand.
@param array  $activectx  The active context.
@param string $activeprty The active property.

@return JsonObject The expanded value.
Expands a scalar value