コード例 #1
0
ファイル: OgAudio.php プロジェクト: linhntaim/katniss
 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;
 }
コード例 #2
0
ファイル: OgImage.php プロジェクト: linhntaim/katniss
 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;
 }
コード例 #3
0
ファイル: OgVideo.php プロジェクト: linhntaim/katniss
 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;
 }
コード例 #4
0
ファイル: Extension.php プロジェクト: linhntaim/katniss
 /**
  * @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;
 }