summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Model/Bookmark.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-03 09:14:32 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-03 09:14:32 +0200
commit2077464d464e485a978166604faf158b654fb0cb (patch)
tree13bd87a71a4688fab923ac2e1d0305de3925997e /src/SemanticScuttle/Model/Bookmark.php
parent40b4674e471f8b0fbdc77a26eec86018e2ab03ea (diff)
downloadsemanticscuttle-2077464d464e485a978166604faf158b654fb0cb.tar.gz
semanticscuttle-2077464d464e485a978166604faf158b654fb0cb.tar.bz2
begin bookmark model class with URL validation method
Diffstat (limited to 'src/SemanticScuttle/Model/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Model/Bookmark.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/SemanticScuttle/Model/Bookmark.php b/src/SemanticScuttle/Model/Bookmark.php
new file mode 100644
index 0000000..2cbe38d
--- /dev/null
+++ b/src/SemanticScuttle/Model/Bookmark.php
@@ -0,0 +1,38 @@
+<?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
+{
+ 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