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
This commit is contained in:
cweiske 2009-10-23 17:13:16 +00:00
parent 3df99a0aec
commit 68c01cda10
69 changed files with 170 additions and 170 deletions

View file

@ -1,9 +1,9 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$cdservice =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription'); $cdservice =SemanticScuttle_Service_Factory::get('CommonDescription');
$pageName = isset($pageName)?$pageName:""; $pageName = isset($pageName)?$pageName:"";

View file

@ -20,7 +20,7 @@
***************************************************************************/ ***************************************************************************/
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$logged_on_userid = $userservice->getCurrentUserId(); $logged_on_userid = $userservice->getCurrentUserId();

View file

@ -1,5 +1,5 @@
<?php <?php
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$commonTags =& $b2tservice->getRelatedTagsByHash($hash); $commonTags =& $b2tservice->getRelatedTagsByHash($hash);
$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc'); $commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* 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'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* 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'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* 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'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
if(!isset($user)) { if(!isset($user)) {

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
/* Manage input */ /* Manage input */
$userid = isset($userid)?$userid:NULL; $userid = isset($userid)?$userid:NULL;

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
if(!isset($user)) $user=""; if(!isset($user)) $user="";

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory'); $searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
$logged_on_userid = $userservice->getCurrentUserId(); $logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) { if ($logged_on_userid === false) {

View file

@ -9,8 +9,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
return array('output' => '', 'stoplist' => $stopList); return array('output' => '', 'stoplist' => $stopList);
} }
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
// link '>' // link '>'
if($level>1) { if($level>1) {

View file

@ -27,7 +27,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
function _getbookmark($fieldname, $value, $all = false) { function _getbookmark($fieldname, $value, $all = false) {
if (!$all) { if (!$all) {
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
$range = ' AND uId = '. $sId; $range = ' AND uId = '. $sId;
} else { } else {
@ -61,7 +61,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
if ($row = & $this->db->sql_fetchrow($dbresult)) { if ($row = & $this->db->sql_fetchrow($dbresult)) {
if ($include_tags) { if ($include_tags) {
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$row['tags'] = $b2tservice->getTagsForBookmark($bid); $row['tags'] = $b2tservice->getTagsForBookmark($bid);
} }
$output = $row; $output = $row;
@ -128,7 +128,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
return false; return false;
} }
$userservice = SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getCurrentUser(); $user = $userservice->getCurrentUser();
//user has to be either admin, or owner //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(). // 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) { function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
if($sId == -1) { if($sId == -1) {
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
} }
@ -214,7 +214,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
$extension = end($uriparts); $extension = end($uriparts);
unset($uriparts); unset($uriparts);
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) { if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
$this->db->sql_transaction('rollback'); $this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db); 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); $extension = end($uriparts);
unset($uriparts); unset($uriparts);
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) { if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) {
$this->db->sql_transaction('rollback'); $this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db); 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. // bookmarks; otherwise, just get the public bookmarks.
// - if the $user is set and IS the logged-in user, then get all bookmarks. // - if the $user is set and IS the logged-in user, then get all bookmarks.
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {
@ -506,7 +506,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
return false; return false;
} }
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {

View 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); $tags = $tagservice->normalize($tags);
@ -104,8 +104,8 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
} }
} }
$bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bs =SemanticScuttle_Service_Factory::get('Bookmark');
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
// Create links between tags // Create links between tags
foreach($tags as $key => $tag) { foreach($tags as $key => $tag) {
@ -161,7 +161,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
} }
function deleteTag($uId, $tag) { function deleteTag($uId, $tag) {
$bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bs =SemanticScuttle_Service_Factory::get('Bookmark');
$query = 'DELETE FROM '. $this->getTableName(); $query = 'DELETE FROM '. $this->getTableName();
$query.= ' USING '. $this->getTableName() .', '. $bs->getTableName(); $query.= ' USING '. $this->getTableName() .', '. $bs->getTableName();
@ -235,7 +235,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
} }
function &getTags($userid = NULL) { function &getTags($userid = NULL) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$logged_on_user = $userservice->getCurrentUserId(); $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'; $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 // Returns the most popular tags used for a particular bookmark hash
function &getRelatedTagsByHash($hash, $limit = 20) { function &getRelatedTagsByHash($hash, $limit = 20) {
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
// Logged in // Logged in
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {
@ -340,7 +340,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) { function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) {
// look for admin ids // look for admin ids
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$adminIds = $userservice->getAdminIds(); $adminIds = $userservice->getAdminIds();
// ask for their tags // 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) { function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
// look for contact ids // look for contact ids
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$contacts = $userservice->getWatchlist($user); $contacts = $userservice->getWatchlist($user);
// add the user (to show him/her also his/her tags) // 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) { function renameTag($userid, $old, $new, $fromApi = false) {
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
if (is_null($userid) || is_null($old) || is_null($new)) if (is_null($userid) || is_null($old) || is_null($new))
return false; return false;

View file

@ -62,7 +62,7 @@ class SemanticScuttle_Service_Factory
* *
* @return SemanticScuttle_Service Service object * @return SemanticScuttle_Service Service object
*/ */
public static function getServiceInstance($name) public static function get($name)
{ {
self::loadDb(); self::loadDb();
self::loadService($name); self::loadService($name);

View file

@ -27,7 +27,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
} }
function addLinkedTags($tag1, $tag2, $relationType, $uId) { function addLinkedTags($tag1, $tag2, $relationType, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -57,7 +57,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
// Return linked tags just for admin users // Return linked tags just for admin users
function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) { function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) {
// look for admin ids // look for admin ids
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User'); $userservice = SemanticScuttle_Service_Factory :: get('User');
$adminIds = $userservice->getAdminIds(); $adminIds = $userservice->getAdminIds();
//ask for their linked tags //ask for their linked tags
@ -130,7 +130,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
} }
// try to find data in cache // try to find data in cache
$tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache'); $tcs = SemanticScuttle_Service_Factory::get('TagCache');
if(count($stopList) == 0) { if(count($stopList) == 0) {
$activatedCache = true; $activatedCache = true;
} else { } else {
@ -188,7 +188,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
$query = "SELECT DISTINCT tts.tag1 as tag"; $query = "SELECT DISTINCT tts.tag1 as tag";
$query.= " FROM `". $this->getTableName() ."` tts"; $query.= " FROM `". $this->getTableName() ."` tts";
if($orderBy != null) { if($orderBy != null) {
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tsts =SemanticScuttle_Service_Factory::get('TagStat');
$query.= ", ".$tsts->getTableName() ." tsts"; $query.= ", ".$tsts->getTableName() ." tsts";
} }
$query.= " WHERE tts.tag1 <> ALL"; $query.= " WHERE tts.tag1 <> ALL";
@ -339,7 +339,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
} }
function renameTag($uId, $oldName, $newName) { function renameTag($uId, $oldName, $newName) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$newName = $tagservice->normalize($newName); $newName = $tagservice->normalize($newName);
$query = 'UPDATE `'. $this->getTableName() .'`'; $query = 'UPDATE `'. $this->getTableName() .'`';
@ -366,10 +366,10 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
} }
function update($tag1, $tag2, $relationType, $uId) { function update($tag1, $tag2, $relationType, $uId) {
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tsts =SemanticScuttle_Service_Factory::get('TagStat');
$tsts->updateStat($tag1, $relationType, $uId); $tsts->updateStat($tag1, $relationType, $uId);
$tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache'); $tcs = SemanticScuttle_Service_Factory::get('TagCache');
$tcs->deleteByUser($uId); $tcs->deleteByUser($uId);
} }
@ -377,7 +377,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
$query = 'TRUNCATE TABLE `'. $this->getTableName() .'`'; $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';
$this->db->sql_query($query); $this->db->sql_query($query);
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tsts =SemanticScuttle_Service_Factory::get('TagStat');
$tsts->deleteAll(); $tsts->deleteAll();
} }

View file

@ -37,7 +37,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function getChildren($tag1, $uId) { function getChildren($tag1, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
if($tag1 == '') return false; if($tag1 == '') return false;
@ -66,7 +66,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function addChild($tag1, $tag2, $uId) { function addChild($tag1, $tag2, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -110,7 +110,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function existsChild($tag1, $tag2, $uId) { function existsChild($tag1, $tag2, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -214,7 +214,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function _isSynonymKey($tag1, $uId) { function _isSynonymKey($tag1, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$query = "SELECT tag1 FROM `". $this->getTableName() ."`"; $query = "SELECT tag1 FROM `". $this->getTableName() ."`";
@ -226,7 +226,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function _isSynonymValue($tag2, $uId) { function _isSynonymValue($tag2, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
$query = "SELECT tag2 FROM `". $this->getTableName() ."`"; $query = "SELECT tag2 FROM `". $this->getTableName() ."`";
@ -250,7 +250,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
} }
function _getSynonymKey($tag2, $uId) { function _getSynonymKey($tag2, $uId) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
if($this->_isSynonymKey($tag2)) return $tag2; if($this->_isSynonymKey($tag2)) return $tag2;
@ -279,7 +279,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
* $tagExcepted allows to hide a value. * $tagExcepted allows to hide a value.
*/ */
function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) { function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $tagservice =SemanticScuttle_Service_Factory::get('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tagExcepted = $tagservice->normalize($tagExcepted); $tagExcepted = $tagservice->normalize($tagExcepted);

View file

@ -27,7 +27,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
} }
function getNbChildren($tag1, $relationType, $uId) { 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 = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`";
$query.= " WHERE tag1 = '" .$tag1 ."'"; $query.= " WHERE tag1 = '" .$tag1 ."'";
$query.= " AND relationType = '". $relationType ."'"; $query.= " AND relationType = '". $relationType ."'";
@ -102,7 +102,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
return false; return false;
} }
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId); $linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId);
$nbDescendants = 0; $nbDescendants = 0;
$maxDepth = 0; $maxDepth = 0;
@ -123,7 +123,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
} }
function updateAllStat() { function updateAllStat() {
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`"; $query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`";
$query.= " WHERE relationType = '>'"; $query.= " WHERE relationType = '>'";

View file

@ -612,7 +612,7 @@ class User {
function getName() { function getName() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->name)) { if(!isset($this->name)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->name = $user['name']; $this->name = $user['name'];
} }
@ -622,7 +622,7 @@ class User {
function getEmail() { function getEmail() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->email)) { if(!isset($this->email)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->email = $user['email']; $this->email = $user['email'];
} }
@ -632,7 +632,7 @@ class User {
function getHomepage() { function getHomepage() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->homepage)) { if(!isset($this->homepage)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->homepage = $user['homepage']; $this->homepage = $user['homepage'];
} }
@ -642,7 +642,7 @@ class User {
function getContent() { function getContent() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->content)) { if(!isset($this->content)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->content = $user['uContent']; $this->content = $user['uContent'];
} }
@ -652,7 +652,7 @@ class User {
function getDatetime() { function getDatetime() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->content)) { if(!isset($this->content)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->datetime = $user['uDatetime']; $this->datetime = $user['uDatetime'];
} }
@ -662,14 +662,14 @@ class User {
function isAdmin() { function isAdmin() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->isAdmin)) { if(!isset($this->isAdmin)) {
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$this->isAdmin = $userservice->isAdmin($this->id); $this->isAdmin = $userservice->isAdmin($this->id);
} }
return $this->isAdmin; return $this->isAdmin;
} }
function getNbBookmarks($range = 'public') { function getNbBookmarks($range = 'public') {
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
return $bookmarkservice->countBookmarks($this->getId(), $range); return $bookmarkservice->countBookmarks($this->getId(), $range);
} }
} }

View file

@ -50,10 +50,10 @@ if (!defined('UNIT_TEST_MODE')) {
} }
// 5 // Create mandatory services and objects // 5 // Create mandatory services and objects
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();
$templateservice =SemanticScuttle_Service_Factory::getServiceInstance('Template'); $templateservice =SemanticScuttle_Service_Factory::get('Template');
$tplVars = array(); $tplVars = array();
$tplVars['currentUser'] = $currentUser; $tplVars['currentUser'] = $currentUser;
$tplVars['userservice'] = $userservice; $tplVars['userservice'] = $userservice;

View file

@ -20,14 +20,14 @@ class BookmarksTest extends PHPUnit_Framework_TestCase
$tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode; $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts=SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts=SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -21,16 +21,16 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->cds =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription'); $this->cds =SemanticScuttle_Service_Factory::get('CommonDescription');
$this->cds->deleteAll(); $this->cds->deleteAll();
} }

View file

@ -20,16 +20,16 @@ class SearchTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->shs =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory'); $this->shs =SemanticScuttle_Service_Factory::get('SearchHistory');
$this->shs->deleteAll(); $this->shs->deleteAll();
} }

View file

@ -19,14 +19,14 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -19,16 +19,16 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->tcs =SemanticScuttle_Service_Factory::getServiceInstance('TagCache'); $this->tcs =SemanticScuttle_Service_Factory::get('TagCache');
$this->tcs->deleteAll(); $this->tcs->deleteAll();
} }

View file

@ -16,16 +16,16 @@ class TagsTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; 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->ts->deleteAll();
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User'); $this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -20,13 +20,13 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmark2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tagservice'); $bookmark2tagservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tagservice');
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark'); $bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag'); $tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
$tagcacheservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagCache'); $tagcacheservice = SemanticScuttle_Service_Factory :: get('TagCache');
$commondescriptionservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription'); $commondescriptionservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
$searchhistoryservice = SemanticScuttle_Service_Factory :: getServiceInstance('SearchHistory'); $searchhistoryservice = SemanticScuttle_Service_Factory :: get('SearchHistory');
$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat'); $tagstatservice = SemanticScuttle_Service_Factory :: get('TagStat');
// Header variables // Header variables
$tplVars['subtitle'] = T_('Manage users'); $tplVars['subtitle'] = T_('Manage users');

View file

@ -24,9 +24,9 @@
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', ''); 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) { function displayTag($tag, $uId) {
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags $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.'\''; $output = '{ id:'.rand().', name:\''.$tag.'\'';
$linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>'); $linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>');

View file

@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
?> ?>

View file

@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
?> ?>

View file

@ -24,9 +24,9 @@
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat'); $tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', ''); 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) { function displayTag($tag, $uId) {
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags $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.'\''; $output = '{ id:'.rand().', name:\''.$tag.'\'';
$linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId); $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId);

View file

@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
?> ?>

View file

@ -25,7 +25,7 @@ header('Cache-Control: no-cache, must-revalidate');
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark'); $bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', ''); isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', '');

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');

View file

@ -6,7 +6,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))

View file

@ -13,7 +13,7 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) {
} }
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
/* /*

View file

@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))

View 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 header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); $userservice =SemanticScuttle_Service_Factory::get('User');
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
?> ?>
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?> <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?>

View file

@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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 // Get all the bookmark's passed-in information
if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != '')) if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))

View file

@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.

View file

@ -7,7 +7,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.

View file

@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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 // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting

View file

@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.

View file

@ -9,7 +9,7 @@
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.

View file

@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Check to see if a tag was specified.

View file

@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Get the posts relevant to the passed-in variables.

View file

@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* 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. // Get the tags relevant to the passed-in variables.

View file

@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
require_once '../../src/SemanticScuttle/header.php'; require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
// Get the tag info. // Get the tag info.
if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != '')) if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark'); $bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
$cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription'); $cdservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', ''); isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark'); $bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', ''); isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');

View file

@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);

View file

@ -67,7 +67,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
function startElement($parser, $name, $attrs) { function startElement($parser, $name, $attrs) {
global $depth, $status, $tplVars, $userservice; global $depth, $status, $tplVars, $userservice;
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
if ($name == 'POST') { if ($name == 'POST') {
while(list($attrTitle, $attrVal) = each($attrs)) { while(list($attrTitle, $attrVal) = each($attrs)) {

View file

@ -22,7 +22,7 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -22,7 +22,7 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag'); $tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
/* Managing current logged user */ /* Managing current logged user */
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', ''); isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL; @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
header('Content-Type: application/xml'); header('Content-Type: application/xml');

View file

@ -36,8 +36,8 @@ if (POST_TERMS != '') {
// GET // GET
} else { } else {
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory'); $searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
/* Managing current logged user */ /* Managing current logged user */
$currentUserId = $userservice->getCurrentUserId(); $currentUserId = $userservice->getCurrentUserId();

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag'); $tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,7 +22,7 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag'); $tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag'); $tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription'); $cdservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -22,7 +22,7 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag'); $tagservice = SemanticScuttle_Service_Factory :: get('Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,9 +22,9 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag'); $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag'); $tagservice = SemanticScuttle_Service_Factory :: get('Tag');
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag'); $tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);

View file

@ -35,7 +35,7 @@ exit();
// This part below will be executed once you comment the two lines above // This part below will be executed once you comment the two lines above
///////////////// /////////////////
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat'); $tagstatservice = SemanticScuttle_Service_Factory :: get('TagStat');
?> ?>
<h1>Upgrade</h1> <h1>Upgrade</h1>

View file

@ -22,8 +22,8 @@
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing current logged user */ /* Managing current logged user */
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();

View file

@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php'; require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache'); $cacheservice =SemanticScuttle_Service_Factory::get('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);