Exemplo n.º 1
0
 /**
  * Output the OpenGraphProtocol object as HTML elements string
  *
  * @return string
  */
 private function toHTML()
 {
     $allowed = array_flip(['type', 'title', 'site_name', 'description', 'url', 'determiner', 'locale', 'images', 'videos', 'audios']);
     $attributes = array_intersect_key(get_object_vars($this), $allowed);
     return OGMetaBuilder::html($attributes);
 }
Exemplo n.º 2
0
 /**
  * Output the object as HTML <meta> elements
  * @return string HTML meta element string
  */
 public function toHTML()
 {
     return rtrim(OGMetaBuilder::html(get_object_vars($this), static::PREFIX), PHP_EOL);
 }