]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
rename ServiceFactory::getServiceInstance() to get() - much easier to write
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 23 Oct 2009 17:13:16 +0000 (17:13 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 23 Oct 2009 17:13:16 +0000 (17:13 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@396 b3834d28-1941-0410-a4f8-b48e95affb8f

69 files changed:
data/templates/bookmarks.tpl.php
data/templates/dynamictags.inc.php
data/templates/sidebar.block.common.php
data/templates/sidebar.block.linked.php
data/templates/sidebar.block.menu.php
data/templates/sidebar.block.menu2.php
data/templates/sidebar.block.popular.php
data/templates/sidebar.block.recent.php
data/templates/sidebar.block.related.php
data/templates/sidebar.block.search.php
data/templates/sidebar.linkedtags.inc.php
src/SemanticScuttle/Service/Bookmark.php
src/SemanticScuttle/Service/Bookmark2Tag.php
src/SemanticScuttle/Service/Factory.php
src/SemanticScuttle/Service/Tag2Tag.php
src/SemanticScuttle/Service/TagCache.php
src/SemanticScuttle/Service/TagStat.php
src/SemanticScuttle/Service/User.php
src/SemanticScuttle/header.php
tests/BookmarksTest.php
tests/CommonDescriptionTest.php
tests/SearchTest.php
tests/Tag2TagTest.php
tests/TagsCacheTest.php
tests/TagsTest.php
www/admin.php
www/ajax/getadminlinkedtags.php
www/ajax/getadmintags.php
www/ajax/getcontacttags.php
www/ajax/getlinkedtags.php
www/ajax/gettags.php
www/ajaxDelete.php
www/alltags.php
www/api/export_csv.php
www/api/export_gcs.php
www/api/export_html.php
www/api/export_sioc.php
www/api/posts_add.php
www/api/posts_all.php
www/api/posts_dates.php
www/api/posts_delete.php
www/api/posts_get.php
www/api/posts_public.php
www/api/posts_recent.php
www/api/posts_update.php
www/api/tags_get.php
www/api/tags_rename.php
www/bookmarkcommondescriptionedit.php
www/bookmarks.php
www/edit.php
www/history.php
www/import.php
www/importNetscape.php
www/importStructure.php
www/index.php
www/populartags.php
www/rss.php
www/search.php
www/tag2tagadd.php
www/tag2tagdelete.php
www/tag2tagedit.php
www/tagcommondescriptionedit.php
www/tagdelete.php
www/tagedit.php
www/tagrename.php
www/tags.php
www/upgrade.php
www/users.php
www/watchlist.php

index 176892835fb59edafb7fd29b75f5a727e8cceeea..2314b75554cf6cb91ba1830457038f5fe7d97c8e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
-$cdservice =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$tagservice =SemanticScuttle_Service_Factory::get('Tag');
+$cdservice =SemanticScuttle_Service_Factory::get('CommonDescription');
 
 
 $pageName = isset($pageName)?$pageName:"";
index c1a589fb1639f023caba344def38aaa308de2d14..b18565ba714de7faf73de4789eff097c2d024a5d 100644 (file)
@@ -20,7 +20,7 @@
  ***************************************************************************/
 
 /* Service creation: only useful services are created */
-$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 
index 7fbc782a1e12d984e63e0d22a1a1dee9e5fdd970..951ed809eb5b02130c38c2afc96acd8aab467ecb 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 $commonTags =& $b2tservice->getRelatedTagsByHash($hash);
 $commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
 
index 6802051b7d7b0a71849b38aa80700f9c1919e227..9e91f93246c7556ee24b449d7fb99248a6e56ebf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
 require_once('sidebar.linkedtags.inc.php');
 
index 6ab5a95bf195bc36c2cb88202852b7142490703f..ee82997860ddd8c7f7d5be822199d3c63793eda7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
 
 require_once('sidebar.linkedtags.inc.php');
index fbab636f7145add6f34a5949c2c767885b05b19c..5f06b4068869e9276ac3ae699cde100898b9f20e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
 require_once('sidebar.linkedtags.inc.php');
 
index 3f5e8ca1a7f364673c89c3f300db9ba370e42d96..50756c0c5ecd9bddffdb61c19cd3d669a9fa7086 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 
 if(!isset($user)) {
index 48312089d5e2b45d05f2cc07f9f7dd7846ca39c1..e34f820ac5ac8d9014e57f35aaaf31cc60a77f50 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 /* Manage input */
 $userid = isset($userid)?$userid:NULL;
index 559c648931234cc718d77cd2b7f009e17fde3120..60ee48648548274f3e209d125bd08a6d1a37ef06 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 
 if(!isset($user)) $user="";
index ed79f2852f11a59cab14c79a0121015b40b7d2ec..64cb8ac9b3fcb34b69af201562b35662681c0482 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
+$searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 if ($logged_on_userid === false) {
index f978339e0a0b83252cf8ed2f0df0111cb5d1f966..020d0f0c32f7b0cdcf13872d9be62e88900e60d6 100644 (file)
@@ -9,8 +9,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
        return array('output' => '', 'stoplist' => $stopList);
     }
 
-    $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
-    $tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+    $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
+    $tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
 
     // link '>'
     if($level>1) {
index 6075a0d830efe02b16bad65d880ee024845c1088..c920d65c7d0930eb9348ce8f80280a7a66a40b65 100644 (file)
@@ -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()) {
index bd3f3af41f7864dd8d983d2fa1847c1dfb7f812e..07d75b94377c7703eb2f3f3cafaa40a2b29ceba8 100644 (file)
@@ -53,7 +53,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
                        }
                }
 
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tags = $tagservice->normalize($tags);
 
 
@@ -104,8 +104,8 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
                        }
                }
 
-               $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $bs =SemanticScuttle_Service_Factory::get('Bookmark');
+               $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
                // Create links between tags
                foreach($tags as $key => $tag) {
@@ -161,7 +161,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
        }
 
        function deleteTag($uId, $tag) {
-               $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $bs =SemanticScuttle_Service_Factory::get('Bookmark');
 
                $query = 'DELETE FROM '. $this->getTableName();
                $query.= ' USING '. $this->getTableName() .', '. $bs->getTableName();
@@ -235,7 +235,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
        }
 
        function &getTags($userid = NULL) {
-               $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $userservice =SemanticScuttle_Service_Factory::get('User');
                $logged_on_user = $userservice->getCurrentUserId();
 
                $query = 'SELECT T.tag, COUNT(B.bId) AS bCount FROM '. $GLOBALS['tableprefix'] .'bookmarks AS B INNER JOIN '. $userservice->getTableName() .' AS U ON B.uId = U.'. $userservice->getFieldName('primary') .' INNER JOIN '. $GLOBALS['tableprefix'] .'bookmarks2tags AS T ON B.bId = T.bId';
@@ -310,7 +310,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
 
        // Returns the most popular tags used for a particular bookmark hash
        function &getRelatedTagsByHash($hash, $limit = 20) {
-               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+               $userservice = SemanticScuttle_Service_Factory :: get('User');
                $sId = $userservice->getCurrentUserId();
                // Logged in
                if ($userservice->isLoggedOn()) {
@@ -340,7 +340,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
        
        function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) {
                // look for admin ids
-               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+               $userservice = SemanticScuttle_Service_Factory :: get('User');
                $adminIds = $userservice->getAdminIds();
                
                // ask for their tags
@@ -349,7 +349,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
        
        function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
                // look for contact ids
-               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+               $userservice = SemanticScuttle_Service_Factory :: get('User');
                $contacts = $userservice->getWatchlist($user);
                
                // add the user (to show him/her also his/her tags)
@@ -417,8 +417,8 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
        }
 
        function renameTag($userid, $old, $new, $fromApi = false) {
-               $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
 
                if (is_null($userid) || is_null($old) || is_null($new))
                return false;
index 92747d76c279284243fb678795782dd27c0d66c2..0ea9009b39bad81b7d5776833d9920e732c94b14 100644 (file)
@@ -62,7 +62,7 @@ class SemanticScuttle_Service_Factory
      *
      * @return SemanticScuttle_Service Service object
      */
-    public static function getServiceInstance($name)
+    public static function get($name)
     {
         self::loadDb();
         self::loadService($name);
index b209d60117e8f74282454e3019015d9954c2448f..d283b5709276b1a2a740cbe881aebebc81facf16 100644 (file)
@@ -27,7 +27,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
        }
 
        function addLinkedTags($tag1, $tag2, $relationType, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -57,7 +57,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
        // Return linked tags just for admin users
        function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) {
                // look for admin ids
-               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
+               $userservice = SemanticScuttle_Service_Factory :: get('User');
                $adminIds = $userservice->getAdminIds();
                
                //ask for their linked tags
@@ -130,7 +130,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
                }
 
                // try to find data in cache
-               $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
+               $tcs = SemanticScuttle_Service_Factory::get('TagCache');
                if(count($stopList) == 0) {
                        $activatedCache = true;
                } else {
@@ -188,7 +188,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
                $query = "SELECT DISTINCT tts.tag1 as tag";
                $query.= " FROM `". $this->getTableName() ."` tts";
                if($orderBy != null) {
-                       $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+                       $tsts =SemanticScuttle_Service_Factory::get('TagStat');
                        $query.= ", ".$tsts->getTableName() ." tsts";
                }
                $query.= " WHERE tts.tag1 <> ALL";
@@ -339,7 +339,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
        }       
 
        function renameTag($uId, $oldName, $newName) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $newName = $tagservice->normalize($newName);
 
                $query = 'UPDATE `'. $this->getTableName() .'`';
@@ -366,10 +366,10 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
        }
 
        function update($tag1, $tag2, $relationType, $uId) {
-               $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $tsts->updateStat($tag1, $relationType, $uId);
 
-               $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
+               $tcs = SemanticScuttle_Service_Factory::get('TagCache');
                $tcs->deleteByUser($uId);
        }
 
@@ -377,7 +377,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
                $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';
                $this->db->sql_query($query);
 
-               $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $tsts->deleteAll();
        }
 
index 30f9ebd50ad7b020b20d57ca68bc1ae867dc3696..95f3ea80bda6732ae681e841fc082b696aff8c0a 100644 (file)
@@ -37,7 +37,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function getChildren($tag1, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
 
                if($tag1 == '') return false;
@@ -66,7 +66,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function addChild($tag1, $tag2, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -110,7 +110,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function existsChild($tag1, $tag2, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -214,7 +214,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function _isSynonymKey($tag1, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
 
                $query = "SELECT tag1 FROM `". $this->getTableName() ."`";
@@ -226,7 +226,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function _isSynonymValue($tag2, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag2 = $tagservice->normalize($tag2);
 
                $query = "SELECT tag2 FROM `". $this->getTableName() ."`";
@@ -250,7 +250,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
        }
 
        function _getSynonymKey($tag2, $uId) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag2 = $tagservice->normalize($tag2);
 
                if($this->_isSynonymKey($tag2)) return $tag2;
@@ -279,7 +279,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
         * $tagExcepted allows to hide a value.
         */
        function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
-               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $tagservice =SemanticScuttle_Service_Factory::get('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tagExcepted = $tagservice->normalize($tagExcepted);
 
index c54dcb7cc568c7fd165c1c571e5541b3576ec359..1bb7b05674f7d1bc0cce9a4c1b64ec8286ac3790 100644 (file)
@@ -27,7 +27,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
        }
 
        function getNbChildren($tag1, $relationType, $uId) {
-               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $query = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`";
                $query.= " WHERE tag1 = '" .$tag1 ."'";
                $query.= " AND relationType = '". $relationType ."'";
@@ -102,7 +102,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
                        return false;
                }
 
-               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId);
                $nbDescendants = 0;
                $maxDepth = 0;
@@ -123,7 +123,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
        }
 
        function updateAllStat() {
-               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
                $query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`";
                $query.= " WHERE relationType = '>'";
index 22076fe827a86a54367786c6f87e9c980985a5d6..49951d1d70397b910f4d4721d4c4dbe368b188cb 100644 (file)
@@ -612,7 +612,7 @@ class User {
        function getName() {
                // Look for value only if not already set
                if(!isset($this->name)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $user = $userservice->getUser($this->id);
                        $this->name = $user['name'];
                }
@@ -622,7 +622,7 @@ class User {
        function getEmail() {
                // Look for value only if not already set
                if(!isset($this->email)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $user = $userservice->getUser($this->id);
                        $this->email = $user['email'];
                }
@@ -632,7 +632,7 @@ class User {
        function getHomepage() {
                // Look for value only if not already set
                if(!isset($this->homepage)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $user = $userservice->getUser($this->id);
                        $this->homepage = $user['homepage'];
                }
@@ -642,7 +642,7 @@ class User {
        function getContent() {
                // Look for value only if not already set
                if(!isset($this->content)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $user = $userservice->getUser($this->id);
                        $this->content = $user['uContent'];
                }
@@ -652,7 +652,7 @@ class User {
        function getDatetime() {
                // Look for value only if not already set
                if(!isset($this->content)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $user = $userservice->getUser($this->id);
                        $this->datetime = $user['uDatetime'];
                }
@@ -662,14 +662,14 @@ class User {
        function isAdmin() {
                // Look for value only if not already set
                if(!isset($this->isAdmin)) {
-                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+                       $userservice =SemanticScuttle_Service_Factory::get('User');
                        $this->isAdmin = $userservice->isAdmin($this->id);
                }
                return $this->isAdmin;
        }
        
        function getNbBookmarks($range = 'public') {
-               $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
                return $bookmarkservice->countBookmarks($this->getId(), $range);
        }
 }
index 53dcad6ecaaf142eb269003f8bb90eca90ad20ef..0e8974a942b4f30a1e93e0e7e19d2e79792b9ff1 100644 (file)
@@ -50,10 +50,10 @@ if (!defined('UNIT_TEST_MODE')) {
 }
 
 // 5 // Create mandatory services and objects
-$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+$userservice =SemanticScuttle_Service_Factory::get('User');
 $currentUser = $userservice->getCurrentObjectUser();
 
-$templateservice =SemanticScuttle_Service_Factory::getServiceInstance('Template');
+$templateservice =SemanticScuttle_Service_Factory::get('Template');
 $tplVars = array();
 $tplVars['currentUser'] = $currentUser;
 $tplVars['userservice'] = $userservice;
index fd9ed760e5644917e48b1d9ce24d471c5dea525c..75200582c3fbb855171912b0361072444ae1114e 100644 (file)
@@ -20,14 +20,14 @@ class BookmarksTest extends PHPUnit_Framework_TestCase
             $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $this->us =SemanticScuttle_Service_Factory::get('User');
+               $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts=SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+               $this->b2ts=SemanticScuttle_Service_Factory::get('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $this->tsts->deleteAll();
        }
 
index 87d09d175c3ac84bf5c19554e9d7d9f4503a88e0..3f6917e05b9cc953c97d19362293b187e6873b44 100644 (file)
@@ -21,16 +21,16 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-       $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-       $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+       $this->us =SemanticScuttle_Service_Factory::get('User');
+       $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
        $this->bs->deleteAll();
-       $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+       $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
        $this->b2ts->deleteAll();
-       $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+       $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
        $this->tts->deleteAll(); 
-       $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+       $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
        $this->tsts->deleteAll();
-       $this->cds =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
+       $this->cds =SemanticScuttle_Service_Factory::get('CommonDescription');
        $this->cds->deleteAll();
     }
  
index e03b4d9a70005c0481e8798f9467891b0a0a0a71..3aa49de1b1c0c5bb94eed9da0f668e9fc8aa830c 100644 (file)
@@ -20,16 +20,16 @@ class SearchTest extends PHPUnit_Framework_TestCase
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-       $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-       $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+       $this->us =SemanticScuttle_Service_Factory::get('User');
+       $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
        $this->bs->deleteAll();
-       $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+       $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
        $this->b2ts->deleteAll();
-       $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+       $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
        $this->tts->deleteAll(); 
-       $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+       $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
        $this->tsts->deleteAll();
-       $this->shs =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
+       $this->shs =SemanticScuttle_Service_Factory::get('SearchHistory');
        $this->shs->deleteAll();
     }
 
index 24c0ae106a11d181b1d99a20f0398ec14e6d7357..5445a67c9e81fbdfa11e7a31a3894b00ec8565c9 100644 (file)
@@ -19,14 +19,14 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $this->us =SemanticScuttle_Service_Factory::get('User');
+               $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+               $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $this->tsts->deleteAll();
        }
 
index f401ab63b49b705c1a4bc604aa6a803b98887d63..8e15f2d5a61273464d96f570c0e112ed7219a2e1 100644 (file)
@@ -19,16 +19,16 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $this->us =SemanticScuttle_Service_Factory::get('User');
+               $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+               $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $this->tsts->deleteAll();
-               $this->tcs =SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
+               $this->tcs =SemanticScuttle_Service_Factory::get('TagCache');
                $this->tcs->deleteAll();
        }
 
index bb904e113cd4df56478b60d4dd35a2432bf348e0..f07e04f68b0944d6d970b2db71aa678e45444870 100644 (file)
@@ -16,16 +16,16 @@ class TagsTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
 
-               $this->ts =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+               $this->ts =SemanticScuttle_Service_Factory::get('Tag');
                $this->ts->deleteAll();
-               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
-               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $this->us =SemanticScuttle_Service_Factory::get('User');
+               $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+               $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+               $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+               $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
                $this->tsts->deleteAll();
        }
 
index 37ebe4b5c3e7a37b621abe7664fe9b44d9f50d45..42fa0c8375b52c8fa8b412b56853adf031fb900a 100644 (file)
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmark2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tagservice');
-$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
-$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
-$tagcacheservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagCache');
-$commondescriptionservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
-$searchhistoryservice = SemanticScuttle_Service_Factory :: getServiceInstance('SearchHistory');
-$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
+$bookmark2tagservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tagservice');
+$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
+$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
+$tagcacheservice = SemanticScuttle_Service_Factory :: get('TagCache');
+$commondescriptionservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
+$searchhistoryservice = SemanticScuttle_Service_Factory :: get('SearchHistory');
+$tagstatservice = SemanticScuttle_Service_Factory :: get('TagStat');
 
 // Header variables
 $tplVars['subtitle'] = T_('Manage users');
index 89dd1e6a348fea80cc14ccf57ebdb00c7a611579..0a5d813769281dc3c3345620f589155130601059 100644 (file)
@@ -24,9 +24,9 @@
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
-$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
+$tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
 
 /* Managing all possible inputs */
 isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
@@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
 function displayTag($tag, $uId) {
        $uId = ($uId==0)?NULL:$uId;  // if user is nobody, NULL allows to look for every public tags
        
-       $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+       $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
        $output =  '{ id:'.rand().', name:\''.$tag.'\'';
 
        $linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>');
index 8345516d7798e1b116167dd95432f1ae096752b8..00e890679b670c9981d76a93c37d1ea3172eb7c7 100644 (file)
@@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
 
 ?>
 
index e5086550b3934491f1f660a784b4a83d2814fc68..4ddc49384da562a3d50a59515474406bea87b5d4 100644 (file)
@@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
 
 ?>
 
index 2a93a3dece2c2c2609fb0d3605ef140ca77c707e..9415f87c8c6002c2f2cd0e6a2f2fb415fd906792 100644 (file)
@@ -24,9 +24,9 @@
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
-$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
+$tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
 
 /* Managing all possible inputs */
 isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
@@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
 function displayTag($tag, $uId) {
        $uId = ($uId==0)?NULL:$uId;  // if user is nobody, NULL allows to look for every public tags
        
-       $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+       $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
        $output =  '{ id:'.rand().', name:\''.$tag.'\'';
 
        $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId);
index b6b12c7b0ecd7db83b3bb9f64ce567a6efd26256..3a4a39346b2ade71e995f0ab51e7f7be3b389c4e 100644 (file)
@@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
 
 ?>
 
index f605b3a11bd22ded922de190a0edd453394eb18e..be9ed516633043ca31a612ce320bc23cb7b63ac6 100644 (file)
@@ -25,7 +25,7 @@ header('Cache-Control: no-cache, must-revalidate');
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
+$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
 
 /* Managing all possible inputs */
 isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', '');
index 0a8828846beea65501f99a45c31f61a10a7d3851..52a42b04e2bfd4d8d3d90fae4395fb3f569405a9 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 
 
index c696001cd0cda041bab593d9b1b5bf6f79e9aa16..04000ef90eccb5935c033bf290c4724b8d47294c 100644 (file)
@@ -6,7 +6,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
index 1eed96125cdf38b85c7e705341d7a3e5ce2d1669..fab7fe29af078b8a4d6ab208a2cdcad73cdba49c 100644 (file)
@@ -13,7 +13,7 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) {
 }
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 /*
index 922901adfac25997148da2793665b55d7a29f2e9..0f36c07ec54f09dbbc86bf0ef72d2b98fdc7192b 100644 (file)
@@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 // Check to see if a tag was specified.
 if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
index 90713e77e6fe886a5801ac06e84c5e1506e064d9..4b0898e475dfba4be859a6f5a55f6dd58e32388b 100644 (file)
@@ -5,8 +5,8 @@ require_once '../../src/SemanticScuttle/header.php';
 header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.php
 
 /* Service creation: only useful services are created */
-$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$userservice =SemanticScuttle_Service_Factory::get('User');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 ?>
 <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?>
index f396b5eabbacfbd936fabd9dff362c09a0351f10..aff8771da0342fc61926edb624c955dc6e35dd0c 100644 (file)
@@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 // Get all the bookmark's passed-in information
 if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
index 4c280c7ac1ae972d127c33676e230729b2a311f3..286d3b32fe3484edd734fd1608e917bcee47f376 100644 (file)
@@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Check to see if a tag was specified.
index 5f002d15039bf9c273eb4877d7ca9ba3e3acea7f..5c53a354fed628b397f372fc7c3f2fd8712b9e98 100644 (file)
@@ -7,7 +7,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Check to see if a tag was specified.
index 7ad332f50826c3e7439f5e79aafd5a07a63b457d..9e2781a73188c8e5d95b65abebfd5a147216ec94 100644 (file)
@@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
index a6a61029e8c04842dffc8a2fb53fd6fcc172f3c1..2e43a99e3ea61a7a41c8616a7ab7497ab59c12f5 100644 (file)
@@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Check to see if a tag was specified.
index 2ade45ef8ed5ec9da8cd94839c09818b63ef9427..ca63f44560dec82a3bd2f26fbcabdbc2acbce3ff 100644 (file)
@@ -9,7 +9,7 @@
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Check to see if a tag was specified.
index e8bc644a04fca91ebd46c0724d2c3ef692bfc078..7d2e8dcc0cfdee9bb053ed1032f4b87f0d7a50b5 100644 (file)
@@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Check to see if a tag was specified.
index 18e5676ea80b6da86abfe94b03fda28341a796b3..9eb5dbdacf845dd17d0c29f6fe1c186f8f0cf2d8 100644 (file)
@@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 // Get the posts relevant to the passed-in variables.
index 043b62909217c5d59bb5a29494a3e22ce3e26ad6..23dfd2ac5533e01cd1bcd67710d1863b1892d0fc 100644 (file)
@@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 
 // Get the tags relevant to the passed-in variables.
index bf78b39baea52ee3a3993e918aed1d7b558f909f..a8e281c08201bb928f721777a84f29854b488b85 100644 (file)
@@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
 require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 // Get the tag info.
 if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
index 8a46313fe6a6cf267f237234f9e1f6cefc4fbf1f..0cd46d95cffe90f02d86d8cd53ebad757356dde1 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice  = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
-$cdservice        = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
+$bookmarkservice  = SemanticScuttle_Service_Factory :: get('Bookmark');
+$cdservice        = SemanticScuttle_Service_Factory :: get('CommonDescription');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 32bdba03507ed76c1ac8519d157df4470f1343f8..4a36a3961dd3faaf2795bfd8a13aa9b1d8dd2388 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
index 6f30d3c04edb4cc76c618aedecd08a4ae1d84e59..ba4ae89a0fe8f908a3d7ce38abb6ed3d8d859d40 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
+$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
 
 /* Managing all possible inputs */
 isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
index a7c2024ff61dfa231c57d631dd5fe7b1da596f58..fa1c535df6de1c6f543722922b95aa2aa43478d7 100644 (file)
@@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
index 8f6e3869d83fe979d2b2927772fee444c9b38e67..87f0a9a71f2b43c7f7ad55b8ae46e59115e4014b 100644 (file)
@@ -67,7 +67,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
 function startElement($parser, $name, $attrs) {
        global $depth, $status, $tplVars, $userservice;
 
-       $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+       $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
        if ($name == 'POST') {
                while(list($attrTitle, $attrVal) = each($attrs)) {
index ad5b414c524e522fbbfe88699b0eb78ff20d7df5..a941145c887962e56a6ba32d3ada265744a44b0d 100644 (file)
@@ -22,7 +22,7 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
 
 
 /* Managing all possible inputs */
index c5f5fa02c32bfd7778df2efbfcc79da0eb390dae..0611fee8202ee9d72b19f1ea8622f986b27458e2 100644 (file)
@@ -22,7 +22,7 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
 
 /* Managing current logged user */
 $currentUser = $userservice->getCurrentObjectUser();
index 28bf678a61173563b85bcf4d2f6c7989fee76831..bc1b354f592f0703a9ee587fe32a51a7c16de67f 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
index 2f501daeb2e89fecaf80cf5c144a5f232b7d8763..06813e9a26b8b7d8f442f6033908f7ad9d2313ff 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
 
index 672f4cdae3ffef144143ec82a368e730e3e03cd1..8c08015f9e1546902efe85391beec9cacf38e488 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 
 header('Content-Type: application/xml');
index 4a1505324de179f1bb60f92e4792e768c406bd67..2b65b2fec4e23d9d6eb96fa8924e26aba6dbee8b 100644 (file)
@@ -36,8 +36,8 @@ if (POST_TERMS != '') {
        // GET
 } else {
        /* Service creation: only useful services are created */
-       $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-       $searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
+       $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+       $searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
 
        /* Managing current logged user */
        $currentUserId = $userservice->getCurrentUserId();
index cc1ecb4bfea8d8a22a6173558246baa91aabbe14..166a0d314531e2026cc7c220cb689aecb3127679 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
+$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index dd71a875b056bde6256e5be23f5399d23d3672a4..af639b36ca442dc08b2f077bc5ba73565ae4a01c 100644 (file)
@@ -22,7 +22,7 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
+$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 750e5504909ecf6f109d92031d25cbbb2e01ffbf..9ee7b96a970bc8347d3f8175e0756f19b6261082 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
+$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
 
 
 /* Managing all possible inputs */
index 84ca5e3d65d7d5a0bfe9f5a8d6c8243a78a4d501..0d9e9785cae43a8003874ede7c6b34d68c6ed156 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
-$cdservice        = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
+$b2tservice       = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
+$cdservice        = SemanticScuttle_Service_Factory :: get('CommonDescription');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 9ba18fd7edea8025b6d6a34c9a2a6f8e455c168e..1d2ce5e0406b4f6fc7dd7cb0ba48cc01fd78a8f7 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
 
 
 /* Managing all possible inputs */
index 5a3fbb489e3e0d64d8ed4233fd1cbca8de89dfbe..8b27b7dd40b6b013c95c7b68c5a657e78088a3e8 100644 (file)
@@ -22,7 +22,7 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tagservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
+$tagservice       = SemanticScuttle_Service_Factory :: get('Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 735e2e8e04e233b3a3efb3ce70630c80973f0594..7222acf0290fab3f8466f44dc5aabd0410e1b057 100644 (file)
@@ -22,9 +22,9 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
-$tagservice   = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
-$tag2tagservice   = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
+$b2tservice       = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
+$tagservice   = SemanticScuttle_Service_Factory :: get('Tag');
+$tag2tagservice   = SemanticScuttle_Service_Factory :: get('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 52bf289d4d8b37b4a97096c089ac826cb864588e..e3fd6d22ef03ea7f59445a4428dc8a04fd7320fb 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
index 39b82db0bc67e1e1a45a77e866e077c24816852b..10a63ff2c02eefa4a2001ebe6c706d9a331c9986 100644 (file)
@@ -35,7 +35,7 @@ exit();
 // This part below will be executed once you comment the two lines above
 /////////////////
 require_once '../src/SemanticScuttle/header.php';
-$tagstatservice   = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
+$tagstatservice   = SemanticScuttle_Service_Factory :: get('TagStat');
 ?>
 
 <h1>Upgrade</h1>
index 111e5126750c2da93511e0c49b7ae6e1f7c03e39..72f5a3d0a94f6e611f1f1d2da060f8747fea4e11 100644 (file)
@@ -22,8 +22,8 @@
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing current logged user */
 $currentUser = $userservice->getCurrentObjectUser();
index 289a47852ad62dfe015822b210b3361d065234bb..61987813ac864f828a3798aeea2a4cb7dd85e14a 100644 (file)
@@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
-$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
+$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);