private function getPropertyDefinition($activectx, $property, $only = null)
    {
        $result = array(
            '@reverse' => false,
            '@type' => null,
            '@language' => (isset($activectx['@language']))
                ? $activectx['@language']
                : null,
            '@index' => null,
            '@container' => null,
            'isKeyword' => false,
            'compactArrays' => true
        );

        if (in_array($property, self::$keywords)) {
            $result['@type'] = (('@id' === $property) || ('@type' === $property))
                ? '@id'
                : null;
            $result['@language'] = null;
            $result['isKeyword'] = true;
            $result['compactArrays'] = (bool) (('@list' !== $property) && ('@graph' !== $property));
        } else {
            $def = (isset($activectx[$property])) ? $activectx[$property] : null;

            if (null !== $def) {
                $result['@id'] = $def['@id'];
                $result['@reverse'] = $def['@reverse'];

                if (isset($def['@type'])) {
                    $result['@type'] = $def['@type'];
                    $result['@language'] = null;
                } elseif (array_key_exists('@language', $def)) {  // could be null
                    $result['@language'] = $def['@language'];
                }

                if (isset($def['@container'])) {
                    $result['@container'] = $def['@container'];

                    if (('@list' === $def['@container']) || ('@set' === $def['@container'])) {
                        $result['compactArrays'] = false;
                    }
                }
            }
        }

        if ($only) {
            return (isset($result[$only])) ? $result[$only] : null;
        }

        return $result;
    }
private function getPropertyDefinition($activectx, $property, $only = null)
    {
        $result = array(
            '@reverse' => false,
            '@type' => null,
            '@language' => (isset($activectx['@language']))
                ? $activectx['@language']
                : null,
            '@index' => null,
            '@container' => null,
            'isKeyword' => false,
            'compactArrays' => true
        );

        if (in_array($property, self::$keywords)) {
            $result['@type'] = (('@id' === $property) || ('@type' === $property))
                ? '@id'
                : null;
            $result['@language'] = null;
            $result['isKeyword'] = true;
            $result['compactArrays'] = (bool) (('@list' !== $property) && ('@graph' !== $property));
        } else {
            $def = (isset($activectx[$property])) ? $activectx[$property] : null;

            if (null !== $def) {
                $result['@id'] = $def['@id'];
                $result['@reverse'] = $def['@reverse'];

                if (isset($def['@type'])) {
                    $result['@type'] = $def['@type'];
                    $result['@language'] = null;
                } elseif (array_key_exists('@language', $def)) {  // could be null
                    $result['@language'] = $def['@language'];
                }

                if (isset($def['@container'])) {
                    $result['@container'] = $def['@container'];

                    if (('@list' === $def['@container']) || ('@set' === $def['@container'])) {
                        $result['compactArrays'] = false;
                    }
                }
            }
        }

        if ($only) {
            return (isset($result[$only])) ? $result[$only] : null;
        }

        return $result;
    }
private function getPropertyDefinition ( $ activectx , $ property , $ only = null ) { $ result = array ( '@reverse' => false , '@type' => null , '@language' => ( isset ( $ activectx [ '@language' ] ) ) ? $ activectx [ '@language' ] : null , '@index' => null , '@container' => null , 'isKeyword' => false , 'compactArrays' => true ) ; if ( in_array ( $ property , self :: $ keywords ) ) { $ result [ '@type' ] = ( ( '@id' === $ property ) || ( '@type' === $ property ) ) ? '@id' : null ; $ result [ '@language' ] = null ; $ result [ 'isKeyword' ] = true ; $ result [ 'compactArrays' ] = ( bool ) ( ( '@list' !== $ property ) && ( '@graph' !== $ property ) ) ; } else { $ def = ( isset ( $ activectx [ $ property ] ) ) ? $ activectx [ $ property ] : null ; if ( null !== $ def ) { $ result [ '@id' ] = $ def [ '@id' ] ; $ result [ '@reverse' ] = $ def [ '@reverse' ] ; if ( isset ( $ def [ '@type' ] ) ) { $ result [ '@type' ] = $ def [ '@type' ] ; $ result [ '@language' ] = null ; } elseif ( array_key_exists ( '@language' , $ def ) ) { // could be null $ result [ '@language' ] = $ def [ '@language' ] ; } if ( isset ( $ def [ '@container' ] ) ) { $ result [ '@container' ] = $ def [ '@container' ] ; if ( ( '@list' === $ def [ '@container' ] ) || ( '@set' === $ def [ '@container' ] ) ) { $ result [ 'compactArrays' ] = false ; } } } } if ( $ only ) { return ( isset ( $ result [ $ only ] ) ) ? $ result [ $ only ] : null ; } return $ result ; }
Returns a property's definition

The result will be in the form

<code>
array('@type'      => type or null,
'@language'  => language or null,
'@container' => container or null,
'isKeyword'  => true or false)
</code>

If `$only` is set, only the value of that key of the array
above will be returned.

@param array       $activectx The active context.
@param string      $property  The property.
@param null|string $only      If set, only this element of the
definition will be returned.

@return array|string|null Returns either the property's definition or
null if not found.
Returns a property s definition