src/Micrometa/Application/Factory/ItemFactory.php
protected function processLanguageTaggedPropertyValue($propertyValue)
    {
        $language = null;
        if (is_object($propertyValue)) {
            // If this is an invalid language tagged object
            if (!isset($propertyValue->lang) || !isset($propertyValue->value)) {
                throw new RuntimeException(
                    RuntimeException::INVALID_LANGUAGE_TAGGED_VALUE_STR,
                    RuntimeException::INVALID_LANGUAGE_TAGGED_VALUE
                );
            }

            $language      = $propertyValue->lang;
            $propertyValue = $propertyValue->value;
        }

        return [$propertyValue, $language];
    }
protected function processLanguageTaggedPropertyValue($propertyValue)
    {
        $language = null;
        if (is_object($propertyValue)) {
            // If this is an invalid language tagged object
            if (!isset($propertyValue->lang) || !isset($propertyValue->value)) {
                throw new RuntimeException(
                    RuntimeException::INVALID_LANGUAGE_TAGGED_VALUE_STR,
                    RuntimeException::INVALID_LANGUAGE_TAGGED_VALUE
                );
            }

            $language      = $propertyValue->lang;
            $propertyValue = $propertyValue->value;
        }

        return [$propertyValue, $language];
    }
protected function processLanguageTaggedPropertyValue ( $ propertyValue ) { $ language = null ; if ( is_object ( $ propertyValue ) ) { // If this is an invalid language tagged object if ( ! isset ( $ propertyValue -> lang ) || ! isset ( $ propertyValue -> value ) ) { throw new RuntimeException ( RuntimeException :: INVALID_LANGUAGE_TAGGED_VALUE_STR , RuntimeException :: INVALID_LANGUAGE_TAGGED_VALUE ) ; } $ language = $ propertyValue -> lang ; $ propertyValue = $ propertyValue -> value ; } return [ $ propertyValue , $ language ] ; }
Process a language tagged property value

@param string|\stdClass $propertyValue Property value

@return array Language and property value
@throws RuntimeException If this is an invalid language tagged value
Process a language tagged property value