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

Class: Browse

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

Class Overview


Browse Class


Variables

Methods



Class Details

[line 29]
Browse Class

This handles all of the sql/filtering on the data before it's thrown out to the templates it also handles pulling back the object_ids and then calling the correct template for the object we are displaying




[ Top ]


Class Variables

static $offset =

[line 34]



Tags:

access:  public

Type:   mixed


[ Top ]

static $simple_browse =

[line 39]



Tags:

access:  public

Type:   mixed


[ Top ]

static $sql =

[line 32]



Tags:

access:  public

Type:   mixed


[ Top ]

static $start =

[line 33]



Tags:

access:  public

Type:   mixed


[ Top ]

static $static_content =  false

[line 43]



Tags:

access:  public

Type:   mixed


[ Top ]

static $total_objects =

[line 35]



Tags:

access:  public

Type:   mixed


[ Top ]

static $type =

[line 36]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method add_supplemental_object [line 567]

static void add_supplemental_object( $class, $uid)

add_supplemental_object

This will add a suplemental object that has to be created




Tags:

access:  public


Parameters:

   $class  
   $uid  

[ Top ]

static method get_allowed_filters [line 251]

static void get_allowed_filters( )

get_allowed_filters

This returns an array of the allowed filters based on the type of object we are working with, this is used to display the 'filter' sidebar stuff, must be called post browse stuff




Tags:

access:  public


[ Top ]

static method get_filter [line 213]

static void get_filter( $key)

get_filter

returns the specified filter value




Tags:

access:  public


Parameters:

   $key  

[ Top ]

static method get_having_sql [line 745]

static void get_having_sql( )

get_having_sql

this returns the having sql stuff, if we've got anything




Tags:

access:  public


[ Top ]

static method get_objects [line 520]

static void get_objects( )

get_objects

This gets an array of the ids of the objects that we are currently browsing by it applies the sql and logic based filters




Tags:

access:  public


[ Top ]

static method get_saved [line 488]

static void get_saved( )

get_saved

This looks in the session for the saved stuff and returns what it finds




Tags:

access:  public


[ Top ]

static method get_sql [line 759]

static void get_sql( )

get_sql

This returns the sql statement we are going to use this has to be run every time we get the objects because it depends on the filters and the type of object we are currently browsing




Tags:

access:  public


[ Top ]

static method get_supplemental_objects [line 553]

static void get_supplemental_objects( )

get_supplemental_objects

This returns an array of 'class','id' for additional objects that need to be created before we start this whole browsing thing




Tags:

access:  public


[ Top ]

static method get_total [line 225]

static void get_total( [ $objects = false])

get_total

This returns the toal number of obejcts for this current sort type. If it's already cached used it! if they pass us an array then use that!




Tags:

access:  public


Parameters:

   $objects  

[ Top ]

static method get_type [line 317]

static void get_type( )

get_type

This returns the type of the browse we currently are using




Tags:

access:  public


[ Top ]

static method is_simple_browse [line 467]

static void is_simple_browse( )

is_simple_browse

this returns true or false if the current browse type is set to static




Tags:

access:  public


[ Top ]

static method load_start [line 477]

static void load_start( )

load_start

This returns a stored start point for the browse mojo




Tags:

access:  public


[ Top ]

static method reset [line 125]

static void reset( )

reset

Reset everything




Tags:

access:  public


[ Top ]

static method reset_base [line 143]

static void reset_base( )

reset_base

this resets the base string




Tags:

access:  public


[ Top ]

static method reset_filters [line 183]

static void reset_filters( )

reset_filter

This is a wrapper function that resets the filters




Tags:

access:  public


[ Top ]

static method reset_having [line 163]

static void reset_having( )

reset_having

Null out the having clause




Tags:

access:  public


[ Top ]

static method reset_join [line 173]

static void reset_join( )

reset_join

clears the joins if there are any




Tags:

access:  public


[ Top ]

static method reset_select [line 153]

static void reset_select( )

reset_select

This resets the select fields that we've added so far




Tags:

access:  public


[ Top ]

static method reset_supplemental_objects [line 193]

static void reset_supplemental_objects( )

reset_supplemental_objects

This clears any sup objects we've added, normally called on every set_type




Tags:

access:  public


[ Top ]

static method reset_total [line 203]

static void reset_total( )

reset_total

This resets the total for the browse type




Tags:

access:  public


[ Top ]

static method save_objects [line 1184]

static void save_objects( $object_ids)

save_objects

This takes the full array of object ides, often passed into show and then if nessecary it saves them into the session




Tags:

access:  public


Parameters:

   $object_ids  

[ Top ]

static method set_filter [line 65]

static void set_filter( $key, $value)

set_filter

This saves the filter data we pass it into the session This is done here so that it's easy to modify where the data is saved should I change my mind in the future. It also makes a single point for whitelist tweaks etc




Tags:

access:  public


Parameters:

   $key  
   $value  

[ Top ]

static method set_filter_from_request [line 1280]

static void set_filter_from_request( $r)



Tags:

access:  public


Parameters:

   $r  

[ Top ]

static method set_having [line 410]

static void set_having( $condition)

set_having

This sets the "HAVING" part of the query, we can only have one.. god this is ugly




Tags:

access:  public


Parameters:

   $condition  

[ Top ]

static method set_join [line 400]

static void set_join( $type, $table, $source, $dest, [ $priority = 100])

set_join

This sets the joins for the current browse object




Tags:

access:  public


Parameters:

   $type  
   $table  
   $source  
   $dest  
   $priority  

[ Top ]

static method set_select [line 390]

static void set_select( $field)

set_select This appends more information to the select part of the SQL statement, we're going to move to the %%SELECT%% style queries, as I think it's the only way to do this....



Tags:

access:  public


Parameters:

   $field  

[ Top ]

static method set_simple_browse [line 436]

static void set_simple_browse( $value)

set_simple_browse

This sets the current browse object to a 'simple' browse method which means use the base query provided and expand from there




Tags:

access:  public


Parameters:

   $value  

[ Top ]

static method set_sort [line 327]

static void set_sort( $sort, [ $order = ''])

set_sort

This sets the current sort(s)




Tags:

access:  public


Parameters:

   $sort  
   $order  

[ Top ]

static method set_start [line 422]

static void set_start( $start)

set_start

This sets the start point for our show functions We need to store this in the session so that it can be pulled back, if they hit the back button




Tags:

access:  public


Parameters:

   $start  

[ Top ]

static method set_static_content [line 449]

static void set_static_content( $value)

set_static_content

This sets true/false if the content of this browse should be static, if they are then content filtering/altering methods will be skipped




Tags:

access:  public


Parameters:

   $value  

[ Top ]

static method set_type [line 286]

static void set_type( $type)

set_type

This sets the type of object that we want to browse by we do this here so we only have to maintain a single whitelist and if I want to change the location I only have to do it here




Tags:

access:  public


Parameters:

   $type  

[ Top ]

static method show_objects [line 1058]

static void show_objects( [ $object_ids = false])

show_objects

This takes an array of objects and requires the correct template based on the type that we are currently browsing




Tags:

access:  public


Parameters:

   $object_ids  

[ Top ]

static method _auto_init [line 1274]

static void _auto_init( )

_auto_init

this function reloads information back from the session it is called on creation of the class




Tags:

access:  public


[ Top ]


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