[Feed-collector-svn] SF.net SVN: feed-collector: [74] trunk/class/Tag_manager.php
Status: Beta
Brought to you by:
c167
|
From: <C1...@us...> - 2006-12-11 17:45:31
|
Revision: 74
http://feed-collector.svn.sourceforge.net/feed-collector/?rev=74&view=rev
Author: C167
Date: 2006-12-11 09:45:13 -0800 (Mon, 11 Dec 2006)
Log Message:
-----------
added a Tag_manager
Added Paths:
-----------
trunk/class/Tag_manager.php
Added: trunk/class/Tag_manager.php
===================================================================
--- trunk/class/Tag_manager.php (rev 0)
+++ trunk/class/Tag_manager.php 2006-12-11 17:45:13 UTC (rev 74)
@@ -0,0 +1,88 @@
+<?php
+
+
+/**
+ * Created on 11.12.2006
+ *
+ * This file is used to
+ * @since 64 - 11.12.2006
+ * @author c167 <c1...@us...>
+ */
+
+class Tag_Manager {
+ /**
+ * The database-object
+ *
+ * @var Object
+ * @since 1.1 - 09.07.2006
+ * @access protected
+ */
+ protected $mdb;
+
+ /**
+ * The standard-constructor
+ *
+ * @param Object $db The PEAR::MDB2
+ *
+ * @return void
+ * @since 1.1 - 09.07.2006
+ * @version 1.1
+ * @access public
+ */
+ public function __construct($mdb) {
+ $this->mdb = $mdb;
+ }
+
+ /**
+ * Add a tag to a feed
+ * @param String $tag The tag itself
+ * @param String $by The username
+ * @param String $feed The feed name
+ * @return boolean
+ * @access public
+ */
+ public function addTag($tag, $by, $feed) {
+
+ }
+
+ /**
+ * Remove a tag from a feed
+ * @param String $tag The tag itself
+ * @param String $feed The feed name
+ * @return boolean
+ * @access public
+ */
+ public function removeTag($tag, $feed) {
+
+ }
+
+ /**
+ * Get the tags from a feed
+ * @param String $feed The feed name
+ * @return mixed
+ * @access public
+ */
+ public function getTags($feed) {
+
+ }
+
+ /**
+ * Random number generator
+ * @param Int $max upper end
+ * @param Int $min lower end, default 0
+ * @param Int $count number of random numbers to generate, default 5
+ * @return Int-Array
+ */
+ protected function generateRandomNumbers($max, $min, $count = 5) {
+ $rand = array ();
+ for ($i = 0; $i < $count;) {
+ $random = (int) (rand($min, $max));
+ if (!in_array($random, $rand)) {
+ $rand[$i] = $random;
+ $i++;
+ }
+ }
+ return $rand;
+ }
+}
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|