mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-21 01:54:23 +00:00
Move functions to somewhere that it's reasonable to define them!
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
parent
db079408d7
commit
1a9d06b470
@ -97,6 +97,7 @@ class Principal {
|
||||
private $cacheNs;
|
||||
private $cacheKey;
|
||||
|
||||
|
||||
function __construct( $type, $value, $use_cache=true ) {
|
||||
global $c, $session;
|
||||
|
||||
@ -115,26 +116,6 @@ class Principal {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This will allow protected properties to be referenced for retrieval, but not
|
||||
* referenced for update.
|
||||
* @param $property
|
||||
*/
|
||||
function __get( $property ) {
|
||||
return $this->{$property};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This will allow protected properties to be examined for whether they are set
|
||||
* without making them writable. PHP 5.1 or later only.
|
||||
* @param $property
|
||||
*/
|
||||
function __isset( $property ) {
|
||||
return isset($this->{$property});
|
||||
}
|
||||
|
||||
|
||||
$cache = new AwlCache();
|
||||
if ( $use_cache && isset($session->principal_id) ) {
|
||||
switch ( $type ) {
|
||||
@ -235,6 +216,25 @@ class Principal {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This will allow protected properties to be referenced for retrieval, but not
|
||||
* referenced for update.
|
||||
* @param $property
|
||||
*/
|
||||
public function __get( $property ) {
|
||||
return $this->{$property};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This will allow protected properties to be examined for whether they are set
|
||||
* without making them writable. PHP 5.1 or later only.
|
||||
* @param $property
|
||||
*/
|
||||
public function __isset( $property ) {
|
||||
return isset($this->{$property});
|
||||
}
|
||||
|
||||
private function assignGuestValues() {
|
||||
$this->user_no = -1;
|
||||
$this->exists = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user