Ampache
[ class tree: Ampache ] [ index: Ampache ] [ all elements ]

Class: Flag

Source Location: /lib/class/flag.class.php

Class Overview

database_object
   |
   --Flag

Flag Class


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 27]
Flag Class

This handles flagging of songs, albums and artists




[ Top ]


Class Variables

$approved = 0

[line 36]



Tags:

access:  public

Type:   mixed


[ Top ]

$comment =

[line 33]



Tags:

access:  public

Type:   mixed


[ Top ]

$date =

[line 35]



Tags:

access:  public

Type:   mixed


[ Top ]

$flag =

[line 34]



Tags:

access:  public

Type:   mixed


[ Top ]

$id =

[line 29]



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 39]



Tags:

access:  public

Type:   mixed


[ Top ]

$object_id =

[line 31]



Tags:

access:  public

Type:   mixed


[ Top ]

$object_type =

[line 32]



Tags:

access:  public

Type:   mixed


[ Top ]

$title =

[line 40]



Tags:

access:  public

Type:   mixed


[ Top ]

$user =

[line 30]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method add [line 169]

static void add( $id, $type, $flag, $comment)

add

This adds a flag entry for an item, it takes an id, a type, the flag type and a comment and then inserts the mofo




Tags:

access:  public


Parameters:

   $id  
   $type  
   $flag  
   $comment  

[ Top ]

static method build_cache [line 63]

static void build_cache( $ids)

build_cache

This takes an array of ids and builds up a nice little cache for us




Tags:

access:  public


Parameters:

   $ids  

[ Top ]

static method fill_tags [line 315]

static void fill_tags( $tagWriter, $song, [ $type = 'comment'])

fill_tags This is used by the write_tags script.



Tags:

access:  public


Parameters:

   $tagWriter  
   $song  
   $type  

[ Top ]

static method get_all [line 123]

static void get_all( [ $count = 0])

get_all

This returns an array of ids of flagged songs if no limit is passed it gets everything




Tags:

access:  public


Parameters:

   $count  

[ Top ]

static method get_approved [line 146]

static void get_approved( )

get_approved

This returns an array of approved flagged songs




Tags:

access:  public


[ Top ]

static method get_disabled [line 103]

static void get_disabled( )

get_disabled

This returns all of the songs that have been disabled, this is a form of being flagged




Tags:

access:  public


[ Top ]

static method get_recent [line 81]

static void get_recent( [ $count = 0])

get_recent

This returns the id's of the most recently flagged songs, it takes an int as an argument which is the count of the object you want to return




Tags:

access:  public


Parameters:

   $count  

[ Top ]

static method validate_flag [line 295]

static void validate_flag( $flag)

validate_flag

This takes a flag input and makes sure it's one of the reigstered and valid 'flag' values




Tags:

access:  public


Parameters:

   $flag  

[ Top ]

constructor __construct [line 46]

Flag __construct( $flag_id)

Constructor

This takes a flagged.id and then pulls in the information for said flag entry




Tags:

access:  public


Parameters:

   $flag_id  

[ Top ]

method approve [line 218]

void approve( )

approve

This approves the current flag object ($this->id) by setting approved to 1




Tags:

access:  public


[ Top ]

method delete [line 196]

void delete( )

delete

This deletes the flagged entry and rescans the file to revert to the origional state, in a perfect world, I could just roll the changes back... not until 3.4 or.. haha 3.5!




Tags:

access:  public


[ Top ]

method format [line 234]

void format( )

format

This function figures out what kind of object we've got and sets up all the vars all nice and fuzzy like




Tags:

access:  public


[ Top ]

method print_flag [line 266]

void print_flag( )

print_flag

This prints out a userfriendly version of the current flag type




Tags:

access:  public


[ Top ]

method print_status [line 255]

void print_status( )

print_status

This prints out a userfriendly version of the current status for this flagged object




Tags:

access:  public


[ Top ]


Documentation generated on Thu, 12 Feb 2009 07:59:58 +0900 by phpDocumentor 1.4.2