Inherited Variables
Inherited Methods
Class: Core
- Core::coreFieldNames()
- Returns the core field names of the core table in an array.
- Core::deleteDBCache()
- Deletes data from the database cache based on the id key.
- Core::FilesListArray()
- Returns a list of filename within a path in array.
- Core::getAllDataArray()
- Returns all records with the all items from the table.
- Core::getAllDataObject()
- Returns all records with all items from the table.
- Core::getAllItemsArray()
- Similar to getAllItemsObject() method but returns the records in an associative array.
- Core::getAllItemsObject()
- Returns all records with the needed items from the table.
- Core::getDBCache()
- Gets temporary data from the database cache.
- Core::getErrorMsg()
- Feturns the value of error_msg, the internal error message.
- Core::getLastQuery()
- Returns the the last sql query string
- Core::getResult()
- Feturns the value of result
- Core::insertDataFromArray()
- Inserts data from an array (passed by reference) into a table.
- Core::insertDataFromInternalArray()
- Inserts data from the internal array previously filled with data by the setDataArray() method.
- Core::isPreLoaded()
- Returns the value of is_preloaded that is set by methods that preload large number of data.
- Core::LastRecordCount()
- Returns the value of rec_count
- Core::saveDBCache()
- Saves temporary data to a cache in database.
- Core::setDataArray()
- Points the core data array to the external array that holds the data to be stored.
- Core::setRefArray()
- Points the reference variable $ref_array to the field names' array.
- Core::setSQL()
- Sets the internal sql query variable to the sql query.
- Core::setTable()
- Sets the coretable variable to the name of the database table.
- Core::setWhereCondition()
- Sets the "where" condition in an update query used with the updateDataFromInternalArray() method.
- Core::Transact()
- Transaction routine, ADODB transaction. It internally uses the ADODB transaction routine.
- Core::updateDataFromArray()
- Updates a record with the data from an array (passed by reference) based on the primary key.
- Core::updateDataFromInternalArray()
- Updates a table using data from an internal array previously filled with data by the setDataArray() method.
- Core::_prepSaveArray()
- Filters the data array intended for saving, removing the key-value pairs that do not correspond to the table's field names.
- Core::_RecordExists()
- Checks if a certain database record exists based onthe supplied query condition.
Class Details
Class for access authentication routínes.
Extends the class "Core". Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance
Tags:
- copyright - 2002,2003 Elpidio Latorilla
- version - beta 1.0.08
- author - Elpidio Latorilla
[ Top ]
Class Variables
$lock_status = FALSE
[line 46]
The access permission status.
FALSE = locked. TRUE = access allowed.
Type: boolean
Overrides:
[ Top ]
$pw_status = FALSE
[line 39]
Password status.
FALSE = wrong password. TRUE = correct password.
Type: boolean
Overrides:
[ Top ]
$tb_user = 'care_users'
[line 20]
Users table name
Type: string
Overrides:
[ Top ]
$user = array()
[line 25]
Holder for user data in associative array
Type: array
Overrides:
[ Top ]
$usr_status = FALSE
[line 32]
User's registration status.
FALSE = unknown. TRUE = known.
Type: boolean
Overrides:
[ Top ]
Class Methods
Access
boolean Access(
[string
$login = ''], [string
$pw = ''])
[line 64]
Constructor. If login and password are passed as parameters, the access data are immediately loaded.
For example:
1 $user = & new Access('Smith','Cocapabana');
2 if( $user->isKnown() && $user->hasValidPassword && $user->isNotLocked()){
3 ...
4 }
Tags:
- access - public
Parameters:
- string $login - Login name
- string $pw - Password
[ Top ]
hasValidPassword
boolean hasValidPassword(
)
[line 129]
Returns the password status of the user
Tags:
- return - TRUE = password valid, else FALSE = invalid password
- access - public
Parameters:
[ Top ]
isKnown
boolean isKnown(
)
[line 137]
Returns the user status of the user whether he is registered user or not.
Tags:
- return - TRUE = is registered as user, else FALSE = invalid user
- access - public
Parameters:
[ Top ]
isLocked
boolean isLocked(
)
[line 146]
Returns the user permission "is locked?" status.
Use only after the access data was loaded by the constructor or loadAccess() method.
Tags:
- return - TRUE = User permissionis locked, else FALSE = user unknown or unregisted
- access - public
Parameters:
[ Top ]
isNotLocked
boolean isNotLocked(
)
[line 155]
Returns the permission "is not locked?" status. A negation of isLocked() method.
Use only after the access data was loaded by the constructor or loadAccess() method.
Tags:
- return - FALSE = User permission is locked, else TRUE = permission is locked
- access - public
Parameters:
[ Top ]
loadAccess
boolean loadAccess(
[string
$login = ''], [string
$pw = ''])
[line 91]
Loads the user data and checks its access status.
Use if login and password were not passed during construction OR if a new access data is to be loaded using the same object instance.
For example:
1 $user = & new Access;
2 ....
3 $user->loadAccess('Smith','Cocapabana');
4 if( $user->isKnown() && $user->hasValidPassword && $user->isNotLocked()){
5 ...
6 }
Tags:
- access - public
Parameters:
- string $login - Login name
- string $pw - Password
[ Top ]
Name
string Name(
)
[line 164]
Returns the user's name.
Use only after the access data was loaded by the constructor or loadAccess() method.
Tags:
- access - public
Parameters:
[ Top ]
PermissionAreas
string PermissionAreas(
)
[line 173]
Returns the permission areas of the user. No interpretation is returned.
Use only after the access data was loaded by the constructor or loadAccess() method.
Tags:
- access - public
Parameters:
[ Top ]