DataManager class for Auth system.

Usually extended by a DataManager class.

package dstruct_auth
todo Split out into separate DataManagers?

 Methods

Attach a Group and an AuthContainer.

attachAuthContainerToGroup(string $containername, string $containerid, integer $groupid) : boolean
Static

Parameters

$containername

string

$containerid

string

$groupid

integer

Returns

boolean

Authenticate a user.

authenticate(string $uname, string $pwd) : \DBIterator
Static

Parameters

$uname

string

$pwd

string

Returns

Delete a Right from a Group.

deleteGroupRight(integer $groupid, integer $rightid) 
Static

Parameters

$groupid

integer

$rightid

integer

Delete an Implied Right.

deleteImpliedRight(integer $rightid, integer $impliedid) 
Static

Parameters

$rightid

integer

$impliedid

integer

Insert an AuthContainer.

insertAuthContainer(string $id) 
Static

Parameters

$id

string

Insert a Group.

insertGroup(string $title) : integer
Static

Parameters

$title

string

Returns

integer

Insert a Right for a Group.

insertGroupRight(integer $groupid, integer $rightid) : integer
Static

Parameters

$groupid

integer

$rightid

integer

Returns

integer

Insert and ImpliedRight.

insertImpliedRight(integer $rightid, integer $impliedid) : integer
Static

Parameters

$rightid

integer

$impliedid

integer

Returns

integer

Insert a Right.

insertRight(array $data) : integer
Static

Parameters

$data

array

Returns

integer

Load all AuthContainers.

loadAllAuthContainers() : \DBIterator
Static

Returns

Load all Groups.

loadAllGroups() : \DBIterator
Static

Returns

Load all Rights.

loadAllRights() : \DBIterator
Static

Returns

Load an AuthContainer by ID.

loadAuthContainerByID(string $id) : \DBIterator
Static

Parameters

$id

string

Returns

Load Group by ID.

loadGroup(integer $id) : \DBIterator
Static

Parameters

$id

integer

Returns

Load the Groups for and AuthContainer.

loadGroupsByAuthContainer(string $containername, integer $containerid) : \DBIterator
Static

Parameters

$containername

string

$containerid

integer

Returns

Load the ImpliedRights for a Right.

loadImpliedRightsByRight(integer $id) : \DBIterator
Static

Parameters

$id

integer

Returns

Load a Right by ID.

loadRight(integer $id) : \DBIterator
Static

Parameters

$id

integer

Returns

Load the Rights for a Group.

loadRightsByGroup(integer $groupid) : \DBIterator
Static

Parameters

$groupid

integer

Returns

Load a user by ID.

loadUser(integer $id) : \DBIterator
Static

Parameters

$id

integer

Returns

Remove the link between a Group and AuthContainer.

removeAuthContainerFromGroup(\unknown $containername, \unknown $containerid, \unknown $groupid) 
Static

Parameters

$containername

\unknown

$containerid

\unknown

$groupid

\unknown

Update and AuthContainer.

updateAuthContainer(string $newid, string $oldid) 
Static

Parameters

$newid

string

$oldid

string

Update a Group.

updateGroup(string $title, integer $id) 
Static

Parameters

$title

string

$id

integer

Update a Right.

updateRight(array $data) 
Static

Parameters

$data

array

Prepares and executes an SQL statement.

doStatement(string $statement, array $values) : object
InheritedStatic

Caches prepared statements via prepareStatement().

inherited_from \Base::doStatement()

Parameters

$statement

string

SQL statement

$values

array

Values for SQL statement

Returns

objectExecuted PDO::Statement

Prepare an SQL statement and return the handle.

prepareStatement(string $statement) : object
InheritedStatic

If previously prepared, returns the cached statement handle.
This method is usually called by doStatement().

inherited_from \Base::prepareStatement()

Parameters

$statement

string

SQL statement to prepare

Returns

objectPDO::Statement

 Properties

 

$statements : array
Inherited
inherited_from \Base::$$statements
 

$attach_authcontainer_to_group : string
 

$delete_group_right : string
 

$delete_implied_right : string
 

$insert_authcontainer : string
 

$insert_group : string
 

$insert_group_right : string
 

$insert_implied_right : string
 

$insert_right : string
 

$load_all_authcontainers : string
 

$load_all_groups : string
 

$load_all_rights : string
 

$load_authcontainer_by_id : string
 

$load_authcontainer_group : string
 

$load_group : string
 

$load_groups_by_auth_container : string
 

$load_implied_rights_by_right : string

We need to return a row with all the right details to create the object of we don't want round trips to the // db for every object created. So... we do the join

 

$load_right : string
 

$load_rights_by_group : string
 

$remove_authcontainer_from_group : string
 

$update_auth_container : string
 

$update_group : string
 

$update_right : string