[3874] trunk/htdocs/system/classes: There' s no reason for private data members in Tags.

0 views
Skip to first unread message

svn-N...@habariproject.org

unread,
Dec 9, 2009, 9:42:40 AM12/9/09
to habar...@googlegroups.com
Revision
3874
Author
rickc
Date
2009-12-09 14:42:40 +0000 (Wed, 09 Dec 2009)

Log Message

There's no reason for private data members in Tags. It's better to make visibility explicit on class methods.

Modified Paths

Diff

Modified: trunk/htdocs/system/classes/tag.php (3873 => 3874)


--- trunk/htdocs/system/classes/tag.php	2009-12-09 14:32:11 UTC (rev 3873)
+++ trunk/htdocs/system/classes/tag.php	2009-12-09 14:42:40 UTC (rev 3874)
@@ -66,7 +66,7 @@
 	 * @param mixed $tag The tag's name, slug, or id
 	 * @return Tag The first tag that matched the given criteria or FALSE on failure
 	 **/
-	static function get( $tag )
+	public static function get( $tag )
 	{
 		return Tags::get_one( $tag );
 	}
@@ -77,7 +77,7 @@
 	 * @param array $paramarray An associative array of tag fields
 	 * @return Tag The new Tag object
 	 **/
-	static function create( $paramarray )
+	public static function create( $paramarray )
 	{
 		$tag = new Tag( $paramarray );
 		$tag = $tag->insert();

Modified: trunk/htdocs/system/classes/tags.php (3873 => 3874)


--- trunk/htdocs/system/classes/tags.php	2009-12-09 14:32:11 UTC (rev 3873)
+++ trunk/htdocs/system/classes/tags.php	2009-12-09 14:42:40 UTC (rev 3874)
@@ -10,8 +10,8 @@
 */
 class Tags extends ArrayObject
 {
-	private static $vocabulary = 'tags';
-	private static $object_type = 'post';
+	protected static $vocabulary = 'tags';
+	protected static $object_type = 'post';
 
 	/**
 	 * Returns a tag or tags based on supplied parameters.
Reply all
Reply to author
Forward
0 new messages