src/SEOTools/OpenGraph.php
protected function eachProperties(
        array $properties,
        $prefix = null,
        $ogPrefix = true
    ) {
        $html = [];

        foreach ($properties as $property => $value) {
            // multiple properties
            if (is_array($value)) {
                $subListPrefix = (is_string($property)) ? $property : $prefix;
                $subList = $this->eachProperties($value, $subListPrefix);

                $html[] = $subList;
            } else {
                if (is_string($prefix)) {
                    $key = (is_string($property)) ?
                        $prefix.':'.$property :
                        $prefix;
                } else {
                    $key = $property;
                }

                // if empty jump to next
                if (empty($value)) {
                    continue;
                }

                $html[] = $this->makeTag($key, $value, $ogPrefix);
            }
        }

        return implode($html);
    }
protected function eachProperties(
        array $properties,
        $prefix = null,
        $ogPrefix = true
    ) {
        $html = [];

        foreach ($properties as $property => $value) {
            // multiple properties
            if (is_array($value)) {
                $subListPrefix = (is_string($property)) ? $property : $prefix;
                $subList = $this->eachProperties($value, $subListPrefix);

                $html[] = $subList;
            } else {
                if (is_string($prefix)) {
                    $key = (is_string($property)) ?
                        $prefix.':'.$property :
                        $prefix;
                } else {
                    $key = $property;
                }

                // if empty jump to next
                if (empty($value)) {
                    continue;
                }

                $html[] = $this->makeTag($key, $value, $ogPrefix);
            }
        }

        return implode($html);
    }
protected function eachProperties ( array $ properties , $ prefix = null , $ ogPrefix = true ) { $ html = [ ] ; foreach ( $ properties as $ property => $ value ) { // multiple properties if ( is_array ( $ value ) ) { $ subListPrefix = ( is_string ( $ property ) ) ? $ property : $ prefix ; $ subList = $ this -> eachProperties ( $ value , $ subListPrefix ) ; $ html [ ] = $ subList ; } else { if ( is_string ( $ prefix ) ) { $ key = ( is_string ( $ property ) ) ? $ prefix . ':' . $ property : $ prefix ; } else { $ key = $ property ; } // if empty jump to next if ( empty ( $ value ) ) { continue ; } $ html [ ] = $ this -> makeTag ( $ key , $ value , $ ogPrefix ) ; } } return implode ( $ html ) ; }
Make list of open graph tags.

@param array       $properties array of properties
@param null|string $prefix     prefix of property
@param bool        $ogPrefix   opengraph prefix

@return string
Make list of open graph tags .