diff --git a/demo/index.php b/demo/index.php index 7ea2fc5..e4375ce 100644 --- a/demo/index.php +++ b/demo/index.php @@ -8,70 +8,70 @@ - - - - Social Links - - - - - - - -

Social links

- - - - + + + Social Links + + + + + + + +

Social links

+ + + + - - - $name; ?> - - - - - - - -
shareCount === null ? 'not available' : $provider->shareCount; ?> - shareUrl ? "Share" : 'Cannot be shared'; ?> -
- -
html() as $tag) {
-					echo htmlspecialchars($tag)."\n";
-				}
-				echo "\n";
-				foreach ($page->openGraph() as $tag) {
-					echo htmlspecialchars($tag)."\n";
-				}
-				echo "\n";
-				foreach ($page->twitterCard() as $tag) {
-					echo htmlspecialchars($tag)."\n";
-				}
-			?>
- - - -
- - - - - - - -
- - - + + + $name; ?> + + + + + + + +
shareCount === null ? 'not available' : $provider->shareCount; ?> + shareUrl ? "Share" : 'Cannot be shared'; ?> +
+ +
html() as $tag) {
+                    echo htmlspecialchars($tag)."\n";
+                }
+                echo "\n";
+                foreach ($page->openGraph() as $tag) {
+                    echo htmlspecialchars($tag)."\n";
+                }
+                echo "\n";
+                foreach ($page->twitterCard() as $tag) {
+                    echo htmlspecialchars($tag)."\n";
+                }
+            ?>
+ + + +
+ + + + + + + +
+ + + diff --git a/src/Page.php b/src/Page.php index 6066137..05d84e1 100644 --- a/src/Page.php +++ b/src/Page.php @@ -83,13 +83,53 @@ public function __call($key, $arguments) /** * Gets the page url. * - * @return string + * @return string|null */ public function getUrl() { return $this->info['url']; } + /** + * Gets the page title. + * + * @return string|null + */ + public function getTitle() + { + return $this->info['title']; + } + + /** + * Gets the page text description. + * + * @return string|null + */ + public function getText() + { + return $this->info['text']; + } + + /** + * Gets the page image. + * + * @return string|null + */ + public function getImage() + { + return $this->info['image']; + } + + /** + * Gets the page twitterUser. + * + * @return string|null + */ + public function getTwitterUser() + { + return $this->info['twitterUser']; + } + /** * Gets some page info. *