summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Bookmark.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-23 17:13:16 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-23 17:13:16 +0000
commit68c01cda10ef49b05fffb6e323fa2d34ba5dd2f4 (patch)
tree5aabcd77449786df7629f351e2f2816284f99cd5 /src/SemanticScuttle/Service/Bookmark.php
parent3df99a0aec0b926464449e8ca33c808c63d903df (diff)
downloadsemanticscuttle-68c01cda10ef49b05fffb6e323fa2d34ba5dd2f4.tar.gz
semanticscuttle-68c01cda10ef49b05fffb6e323fa2d34ba5dd2f4.tar.bz2
rename ServiceFactory::getServiceInstance() to get() - much easier to write
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@396 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 6075a0d..c920d65 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -27,7 +27,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
function _getbookmark($fieldname, $value, $all = false) {
if (!$all) {
- $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+ $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId();
$range = ' AND uId = '. $sId;
} else {
@@ -61,7 +61,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
if ($row = & $this->db->sql_fetchrow($dbresult)) {
if ($include_tags) {
- $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$row['tags'] = $b2tservice->getTagsForBookmark($bid);
}
$output = $row;
@@ -128,7 +128,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
return false;
}
- $userservice = SemanticScuttle_Service_Factory::getServiceInstance('User');
+ $userservice = SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getCurrentUser();
//user has to be either admin, or owner
@@ -170,7 +170,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
// Note that date is expected to be a string that's interpretable by strtotime().
function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
if($sId == -1) {
- $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+ $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId();
}
@@ -214,7 +214,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
$extension = end($uriparts);
unset($uriparts);
- $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
$this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@@ -270,7 +270,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
$extension = end($uriparts);
unset($uriparts);
- $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) {
$this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@@ -292,9 +292,9 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
// bookmarks; otherwise, just get the public bookmarks.
// - if the $user is set and IS the logged-in user, then get all bookmarks.
- $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
- $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
- $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+ $userservice =SemanticScuttle_Service_Factory::get('User');
+ $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+ $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
$sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) {
@@ -506,7 +506,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
return false;
}
- $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+ $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) {