14 "item_type" => String,
18 "created_date" => DateTime,
19 "last_updated" => DateTime,
20 "last_updated_by_id" => Number
24 "Accesses" =>
'ShareAccess');
26 function User() {
return $this->getRelated(
'SiteUser'); }
29 return $this->getRelatedList(
'ShareAccess',
"",
$constraint);
35 return $handler->getTitle($this->item_key);
40 return Query::create(
'ShareAccess',
"WHERE share_id=:s")
41 ->bind(
":s", $this->share_id)
47 if (!checkPlainGUID(
$token))
54 return Query::create(
ShareToken,
"WHERE token=:t")
58 catch(DataNotFoundException $e)
67 $key =
$obj->getPrimaryKeyValue();
69 $matches = Query::create(
ShareToken,
"WHERE item_type=:t AND item_key=:k")
70 ->bind(
":t",
$type,
":k", $key)
73 return count($matches) > 0 ? $matches[0] :
null;
83 var
$fields = array(
"access_id" =>
'Number',
84 "share_id" =>
'Number',
85 "user_id" =>
'Number',
86 "ip_address" =>
'String',
87 "access_timestamp" =>
'DateTime');
90 "User" =>
"SiteUser");
94 return $this->getRelated(
'ShareToken');
99 return $this->getRelated(
'SiteUser');
104 if (!$this->
user_id)
return "Anonymous";
105 return $this->
User()->getFullName();
FakoliException is the base exception class for all Fakoli errors.
Accesses($constraint="ORDER BY access_timestamp")
static getShareHandler($type)