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

Class: Access

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

Class Overview


Access Class


Variables

Methods



Class Details

[line 26]
Access Class

This class handles the access list mojo for Ampache, it is ment to restrict access based on IP and maybe something else in the future




[ Top ]


Class Variables

$enabled =

[line 37]



Tags:

access:  public

Type:   mixed


[ Top ]

$end =

[line 32]



Tags:

access:  public

Type:   mixed


[ Top ]

$id =

[line 29]



Tags:

access:  public

Type:   mixed


[ Top ]

$key =

[line 36]



Tags:

access:  public

Type:   mixed


[ Top ]

$level =

[line 33]



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 30]



Tags:

access:  public

Type:   mixed


[ Top ]

$start =

[line 31]



Tags:

access:  public

Type:   mixed


[ Top ]

$type =

[line 35]



Tags:

access:  public

Type:   mixed


[ Top ]

$user =

[line 34]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method check [line 321]

static void check( $type, $level)

check_access

This is the global 'has_access' function it can check for any 'type' of object everything uses the global 0,5,25,50,75,100 stuff. GLOBALS['user'] is always used




Tags:

access:  public


Parameters:

   $type  
   $level  

[ Top ]

static method check_function [line 222]

static void check_function( $type)

check_function

This checks if a specific functionality is enabled it takes a type only




Tags:

access:  public


Parameters:

   $type  

[ Top ]

static method check_network [line 250]

static void check_network( $type, $user, $level, [ $ip = ''], [ $key = ''])

check_network

This takes a type, ip, user, level and key and then returns true or false if they have access to this the IP is passed as a dotted quad




Tags:

access:  public


Parameters:

   $type  
   $user  
   $level  
   $ip  
   $key  

[ Top ]

static method create [line 139]

static void create( $data)

create

This takes a key'd array of data and trys to insert it as a new ACL entry




Tags:

access:  public


Parameters:

   $data  

[ Top ]

static method delete [line 210]

static void delete( $access_id)

delete

deletes the specified access_list entry




Tags:

access:  public


Parameters:

   $access_id  

[ Top ]

static method exists [line 187]

static void exists( $data)

exists

this sees if the ACL that we've specified already exists, prevent duplicates. This ignores the name




Tags:

access:  public


Parameters:

   $data  

[ Top ]

static method get_access_lists [line 383]

static void get_access_lists( )

get_access_lists

returns a full listing of all access rules on this server




Tags:

access:  public


[ Top ]

static method session_exists [line 465]

static void session_exists( $data, $key, $type)

session_exists

This checks to see if the specified session of the specified type exists, it also provides an array of key'd data that may be required based on the type




Tags:

access:  public


Parameters:

   $data  
   $key  
   $type  

[ Top ]

static method validate_type [line 361]

static void validate_type( $type)

validate_type

This cleans up and validates the specified type




Tags:

access:  public


Parameters:

   $type  

[ Top ]

constructor __construct [line 43]

Access __construct( [ $access_id = ''])

constructor

Takes an ID of the access_id dealie :)




Tags:

access:  public


Parameters:

   $access_id  

[ Top ]

method format [line 80]

void format( )

format This makes the Access object a nice fuzzy human readable object, spiffy ain't it.



Tags:

access:  public


[ Top ]

method get_level_name [line 404]

void get_level_name( )

get_level_name

take the int level and return a named level




Tags:

access:  public


[ Top ]

method get_type_name [line 438]

void get_type_name( )

get_type_name

This function returns the pretty name for our current type




Tags:

access:  public


[ Top ]

method get_user_name [line 425]

void get_user_name( )

get_user_name

Take a user and return their full name




Tags:

access:  public


[ Top ]

method update [line 95]

void update( $data)

update

This function takes a named array as a datasource and updates the current access list entry




Tags:

access:  public


Parameters:

   $data  

[ Top ]


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