summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Model/Bookmark.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-12 19:25:03 +0200
commit88d7b9631b444cef28115fb8e0bae736b45e557e (patch)
tree9c676c98dbface055c68df2731f3a7482dae465b /src/SemanticScuttle/Model/Bookmark.php
parentfc093a5fe51d35a2991e549e8836cac15dc2888b (diff)
parentb57c8d4581b05cd70a363cacd37f9ffc7da785d8 (diff)
downloadsemanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.gz
semanticscuttle-88d7b9631b444cef28115fb8e0bae736b45e557e.tar.bz2
Merge branch 'master' into configurable-privacy2
Diffstat (limited to 'src/SemanticScuttle/Model/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Model/Bookmark.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/SemanticScuttle/Model/Bookmark.php b/src/SemanticScuttle/Model/Bookmark.php
new file mode 100644
index 0000000..8bda0b3
--- /dev/null
+++ b/src/SemanticScuttle/Model/Bookmark.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * SemanticScuttle - your social bookmark manager.
+ *
+ * PHP version 5.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+
+/**
+ * Bookmark model class, keeping the data of a single bookmark.
+ * It will slowly replace the old array style format.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+class SemanticScuttle_Model_Bookmark
+{
+ /**
+ * Checks if the given URL is valid and may be used with this
+ * SemanticScuttle installation.
+ *
+ * @param string $url URL to verify.
+ *
+ * @return boolean True if the URL is allowed, false if not
+ */
+ public static function isValidUrl($url)
+ {
+ $scheme = parse_url($url, PHP_URL_SCHEME);
+ if (array_search($scheme, $GLOBALS['allowedProtocols']) === false) {
+ return false;
+ }
+ return true;
+ }
+
+}
+
+
+?> \ No newline at end of file