public function render() { $output = Html5::metaProperty('og:audio', $this->url); if (!empty($this->secureUrl)) { $output .= Html5::metaProperty('og:audio:secure_url', $this->secureUrl); } if (!empty($this->type)) { $output .= Html5::metaProperty('og:audio:type', $this->type); } return $output; }
public function render() { $output = PHP_EOL . Html5::metaProperty('og:image', $this->url); if (!empty($this->secureUrl)) { $output .= PHP_EOL . Html5::metaProperty('og:image:secure_url', $this->secureUrl); } if (!empty($this->type)) { $output .= PHP_EOL . Html5::metaProperty('og:image:type', $this->type); } if (!empty($this->width)) { $output .= PHP_EOL . Html5::metaProperty('og:image:width', $this->width); } if (!empty($this->height)) { $output .= PHP_EOL . Html5::metaProperty('og:image:height', $this->height); } return $output; }
public function render() { $output = Html5::metaProperty('og:video', $this->url); if (!empty($this->secureUrl)) { $output .= Html5::metaProperty('og:video:secure_url', $this->secureUrl); } if (!empty($this->type)) { $output .= Html5::metaProperty('og:video:type', $this->type); } if (!empty($this->width)) { $output .= Html5::metaProperty('og:video:width', $this->width); } if (!empty($this->height)) { $output .= Html5::metaProperty('og:video:height', $this->height); } return $output; }
/** * @param string $property * @param array $contents * @return string */ protected function parseContents($property, array $contents) { $output = ''; foreach ($contents as $content) { $output .= PHP_EOL . Html5::metaProperty($property, $content); } return $output; }