src/Micrometa/Infrastructure/Parser/JsonLD.php
protected function processNodeProperty($name, $value, array &$properties)
    {
        // If this is a nested item
        if (is_object($value)) {
            $this->processNodePropertyObject($name, $value, $properties);

            // Else: If this is a value list
        } elseif (is_array($value)) {
            foreach ($value as $listValue) {
                $this->processNodeProperty($name, $listValue, $properties);
            }

            // Else: If the value is not empty
        } elseif ($value) {
            $properties[$name]->values[] = $value;
        }
    }
protected function processNodeProperty($name, $value, array &$properties)
    {
        // If this is a nested item
        if (is_object($value)) {
            $this->processNodePropertyObject($name, $value, $properties);

            // Else: If this is a value list
        } elseif (is_array($value)) {
            foreach ($value as $listValue) {
                $this->processNodeProperty($name, $listValue, $properties);
            }

            // Else: If the value is not empty
        } elseif ($value) {
            $properties[$name]->values[] = $value;
        }
    }
protected function processNodeProperty ( $ name , $ value , array & $ properties ) { // If this is a nested item if ( is_object ( $ value ) ) { $ this -> processNodePropertyObject ( $ name , $ value , $ properties ) ; // Else: If this is a value list } elseif ( is_array ( $ value ) ) { foreach ( $ value as $ listValue ) { $ this -> processNodeProperty ( $ name , $ listValue , $ properties ) ; } // Else: If the value is not empty } elseif ( $ value ) { $ properties [ $ name ] -> values [ ] = $ value ; } }
Process a property value

@param string $name                  Property name
@param \stdClass|array|string $value Property value
@param array $properties             Item properties
Process a property value