members
Packages
Interfaces
Classes
Files

Class: Authorizations

Source Location: /members/authorizations.class.php [line 36]

Class Overview


This class contains only static methods, it souldn't be instantiated.

Author(s):



Class Details

This class contains only static methods, it souldn't be instantiated.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

static method auth_array_simple [line 85]

static Array auth_array_simple( int $bit_value, string $idselect, [boolean $admin_auth_default = true])
Returns an array with the authorizations given by variable number of arrays passed in argument.

Tags:

  • return: with the authorization for the bit specified.

Parameters:

int   $bit_value   The bit emplacement in the authorization array.
string   $idselect   Html id of the html select field of authorizations (in most case the same value as $bit_value).
boolean   $admin_auth_default   Give authorization for the administrator by default.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method build_auth_array_from_form [line 45]

static array build_auth_array_from_form( )
Returns an array with the authorizations given by variable number of arrays passed in argument. This returned array is used to be serialized.

Tags:

  • return: The array of authorizations.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method capture_and_shift_bit_auth [line 328]

static array capture_and_shift_bit_auth( array $auth, int $original_bit, [int $final_bit = 1])
Capture authorizations and shift a particular bit to an another bit (1 is used by default).

Tags:

  • return: The new authorization array.

Parameters:

array   $auth   Array of authorizations.
int   $original_bit   The bit to shift.
int   $final_bit   Bit distination (1 is used by default).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method check_auth [line 251]

static boolean check_auth( int $type, int $value, &$array_auth, int $bit, array $array_auth)
Check authorizations for a member, a group or a rank

Tags:

  • return: True if authorized, false otherwise.

Parameters:

int   $type   Type of check, used RANK_TYPE for ranks, GROUP_TYPE for groups and USER_TYPE for users.
int   $value   Value int the authorization array to check.
array   $array_auth   Array of authorization.
int   $bit   Bit emplacement for the check
   &$array_auth  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method generate_select [line 112]

static String generate_select( int $auth_bit, [array $array_auth = array()], [array $array_ranks_default = array()], [string $idselect = ''], [int $disabled = ''], [boolean $disabled_advanced_auth = false])
Generate a multiple select field for the form which create authorization for ranks, groups and members.

Tags:

  • return: The formated select.

Parameters:

int   $auth_bit   The bit emplacement used to set it.
array   $array_auth   Array of authorization, allow you to select value authorized for this bit.
array   $array_ranks_default   Array of ranks selected by default.
string   $idselect   Html id used for the select.
int   $disabled   Disabled all option for the select. Set to 1 for disable.
boolean   $disabled_advanced_auth   Disable advanced authorizations.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method merge_auth [line 287]

static array merge_auth( array $parent, array $child, int $auth_bit, int $mode)
Merge two authorizations array, first is the parent, second is the inherited child.

Tags:

  • return: The new array merged.

Parameters:

array   $parent   Array of authorizations.
array   $child   Array of authorizations.
int   $auth_bit   Bit emplacement for the merge.
int   $mode   Mode used for the merge. Use AUTH_PARENT_PRIORITY to give to the parent the priority for the authorization, AUTH_CHILD_PRIORITY otherwise.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

Documentation generated on Tue, 28 Jul 2009 22:43:34 +0200 by phpDocumentor 1.4.1