|
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.
◆ __construct()
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.
◆ __get()
Principal::__get |
( |
|
$property | ) |
|
This will allow protected properties to be referenced for retrieval, but not referenced for update.
- Parameters
-
Definition at line 254 of file Principal.php.
◆ __isset()
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 264 of file Principal.php.
◆ dav_name()
Return the partial path representing this principal
- Returns
- string The dav_name
Definition at line 382 of file Principal.php.
◆ default_calendar()
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 430 of file Principal.php.
◆ email()
Return the email
- Returns
- string The email
Definition at line 373 of file Principal.php.
◆ FetchCollections()
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 413 of file Principal.php.
◆ FetchDeadProperties()
Principal::FetchDeadProperties |
( |
| ) |
|
|
protected |
Ensure the principal's dead properties are loaded
Definition at line 396 of file Principal.php.
◆ principal_id()
Principal::principal_id |
( |
| ) |
|
Return the principal_id
- Returns
- string The principal_id
Definition at line 364 of file Principal.php.
◆ setUsername()
Principal::setUsername |
( |
|
$new_username | ) |
|
Set the username - but only if the record does not yet exist!
- Returns
- string The username
Definition at line 344 of file Principal.php.
◆ url()
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 470 of file Principal.php.
◆ user_no()
Return the user_no
- Returns
- int The user_no
Definition at line 355 of file Principal.php.
◆ username()
Return the username
- Returns
- string The username
Definition at line 335 of file Principal.php.
◆ usernameFromPath()
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 300 of file Principal.php.
◆ $db_mandatory_fields
Principal::$db_mandatory_fields |
|
staticprivate |
◆ $username
The documentation for this class was generated from the following file: