protected function setIsSimilarToAttribute($values)
    {
        if (is_array($values)) {
            foreach ($values as $key => $value) {
                $product = new self($value);

                $properties = $product->getProperties();

                unset($properties['@context']);

                $properties = array_filter($properties, 'strlen');

                $values[$key] = $properties;
            }
        }

        return $values;
    }
protected function setIsSimilarToAttribute($values)
    {
        if (is_array($values)) {
            foreach ($values as $key => $value) {
                $product = new self($value);

                $properties = $product->getProperties();

                unset($properties['@context']);

                $properties = array_filter($properties, 'strlen');

                $values[$key] = $properties;
            }
        }

        return $values;
    }
protected function setIsSimilarToAttribute ( $ values ) { if ( is_array ( $ values ) ) { foreach ( $ values as $ key => $ value ) { $ product = new self ( $ value ) ; $ properties = $ product -> getProperties ( ) ; unset ( $ properties [ '@context' ] ) ; $ properties = array_filter ( $ properties , 'strlen' ) ; $ values [ $ key ] = $ properties ; } } return $ values ; }
Set isSimilarTo attributes.

@param  mixed $values
@return array
Set isSimilarTo attributes .