|
static | updateableFields () |
|
static | cacheFlush ($where, $whereparams=array()) |
|
static | cacheDelete ($type, $value) |
|
|
| $user_active |
|
| $created |
|
| $modified |
|
| $password |
|
| $fullname |
|
| $email_ok |
|
| $date_format_type |
|
| $locale |
|
| $type_id |
|
| $displayname |
|
| $default_privileges |
|
| $is_principal |
|
| $is_calendar |
|
| $collection_id |
|
| $is_addressbook |
|
| $resourcetypes |
|
| $privileges |
|
|
| $username |
|
| $user_no |
|
| $principal_id |
|
| $email |
|
| $dav_name |
|
| $exists |
|
| $url |
|
| $original_request_url |
|
| $by_email |
|
| $collections |
|
| $dead_properties |
|
| $default_calendar |
|
|
| assignGuestValues () |
|
| assignRowValues ($db_row) |
|
| usernameFromPath ($path) |
|
| Write ($field_values, $inserting=true) |
|
|
static | $db_tablename = 'dav_principal' |
|
static | $db_mandatory_fields |
|
static | $byUserno = array() |
|
static | $byId = array() |
|
static | $byEmail = array() |
|
Definition at line 19 of file Principal.php.
Principal::__construct |
( |
|
$type, |
|
|
|
$value, |
|
|
|
$use_cache = true |
|
) |
| |
Construct a new Principal object. The principal record will be retrieved from the database, or (if not found) initialised to a new record. You can test for whether the Principal exists by calling the Exists() method on the returned object.
Depending on the supplied $type, the following behaviour will occur: path: Will attempt to extract a username or email from the supplied path, and then do what those do. dav_name: Expects the dav_name of a principal, exactly, like: /principal/ and will use that as for username. user_no: Expects an integer which is the usr.user_no (deprecated) principal_id: Expects an integer which is the principal.principal_id email: Will try and retrieve a unique principal by using the email address. Will fail (subsequent call to Exists() will be false) if there is not a unique match. username: Will retrieve based on strtolower($value) = lower(usr.username)
- Parameters
-
string | $type | One of 'path', 'dav_name', 'user_no', 'principal_id', 'email' or 'username' |
mixed | $value | A value appropriate to the $type requested. |
boolean | $use_cache | Whether to use an available cache source (default true) |
- Exceptions
-
Exception | When provided with an invalid $type parameter. |
- Returns
- Principal
There are some values we can construct on the basis of the constructor value.
Definition at line 122 of file Principal.php.
Principal::__get |
( |
|
$property | ) |
|
This will allow protected properties to be referenced for retrieval, but not referenced for update.
- Parameters
-
Definition at line 251 of file Principal.php.
Principal::__isset |
( |
|
$property | ) |
|
This will allow protected properties to be examined for whether they are set without making them writable. PHP 5.1 or later only.
- Parameters
-
Definition at line 261 of file Principal.php.
Return the partial path representing this principal
- Returns
- string The dav_name
Definition at line 379 of file Principal.php.
Principal::default_calendar |
( |
| ) |
|
Return the default calendar for this principal
- Returns
- string The internal dav_name for the home_calendar, or false if there is none
Definition at line 427 of file Principal.php.
Return the email
- Returns
- string The email
Definition at line 370 of file Principal.php.
Principal::FetchCollections |
( |
| ) |
|
|
protected |
Fetch the list of collections for this principal
- Returns
- string The internal dav_name for the home_calendar, or null if there is none
Definition at line 410 of file Principal.php.
Principal::FetchDeadProperties |
( |
| ) |
|
|
protected |
Ensure the principal's dead properties are loaded
Definition at line 393 of file Principal.php.
Principal::principal_id |
( |
| ) |
|
Return the principal_id
- Returns
- string The principal_id
Definition at line 361 of file Principal.php.
Principal::setUsername |
( |
|
$new_username | ) |
|
Set the username - but only if the record does not yet exist!
- Returns
- string The username
Definition at line 341 of file Principal.php.
Principal::url |
( |
|
$type = 'principal' , |
|
|
|
$internal = false |
|
) |
| |
Return the URL for this principal
- Parameters
-
string | $type | The type of URL we want (the principal, by default) |
boolean | $internal | Whether an internal reference is requested |
- Returns
- string The principal-URL
Definition at line 467 of file Principal.php.
Return the user_no
- Returns
- int The user_no
Definition at line 352 of file Principal.php.
Return the username
- Returns
- string The username
Definition at line 332 of file Principal.php.
Principal::usernameFromPath |
( |
|
$path | ) |
|
|
private |
Work out the username, based on elements of the path.
- Parameters
-
string | $path | The path to be used. |
Definition at line 297 of file Principal.php.
Principal::$db_mandatory_fields |
|
staticprivate |
The documentation for this class was generated from the following file: