update 2023-07-25 18:14:08
This commit is contained in:
parent
3c983ea889
commit
babf6ca09b
@ -18,6 +18,7 @@ class Linker << (F,LightGreen) >> #Green {
|
||||
+ __construct(Load $load, Insert $insert, ...)
|
||||
+ get() : ?string
|
||||
+ active(bool $setup = true) : ?string
|
||||
+ valid(string $linker) : bool
|
||||
+ set(string $linker) : bool
|
||||
+ access(string $linker, string $pass, ...) : ?array
|
||||
- hasAccess(string $linker, string $pass) : bool
|
||||
@ -53,14 +54,21 @@ note right of Linker::active
|
||||
return: ?string
|
||||
end note
|
||||
|
||||
note left of Linker::set
|
||||
note left of Linker::valid
|
||||
Check if a Linker is valid active linker
|
||||
|
||||
since: 2.0.1
|
||||
return: bool
|
||||
end note
|
||||
|
||||
note right of Linker::set
|
||||
Set Active Linker
|
||||
|
||||
since: 2.0.1
|
||||
return: bool
|
||||
end note
|
||||
|
||||
note right of Linker::access
|
||||
note left of Linker::access
|
||||
Set Access
|
||||
|
||||
since: 2.0.1
|
||||
@ -72,35 +80,35 @@ note right of Linker::access
|
||||
?string $oldPass
|
||||
end note
|
||||
|
||||
note left of Linker::hasAccess
|
||||
note right of Linker::hasAccess
|
||||
Has Access
|
||||
|
||||
since: 2.0.1
|
||||
return: bool
|
||||
end note
|
||||
|
||||
note right of Linker::getPassGuid
|
||||
note left of Linker::getPassGuid
|
||||
Get Password GUID
|
||||
|
||||
since: 2.0.1
|
||||
return: ?string
|
||||
end note
|
||||
|
||||
note left of Linker::getPassword
|
||||
note right of Linker::getPassword
|
||||
Get Password
|
||||
|
||||
since: 2.0.1
|
||||
return: ?object
|
||||
end note
|
||||
|
||||
note right of Linker::setLinker
|
||||
note left of Linker::setLinker
|
||||
Set Linker
|
||||
|
||||
since: 2.0.1
|
||||
return: bool
|
||||
end note
|
||||
|
||||
note left of Linker::setPassword
|
||||
note right of Linker::setPassword
|
||||
Set Password
|
||||
|
||||
since: 2.0.1
|
||||
|
@ -130,6 +130,28 @@ final class Linker
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a Linker is valid active linker
|
||||
*
|
||||
* @param string $linker The linker GUID value
|
||||
*
|
||||
* @return bool True if active valid linker
|
||||
* @since 2.0.1
|
||||
**/
|
||||
public function valid(string $linker): bool
|
||||
{
|
||||
// is only valid if this linker has an active password
|
||||
if (GuidHelper::valid($linker) && ($password_name = $this->load->value(
|
||||
['linker' => $linker, 'published' => 1],
|
||||
'name', 'password'
|
||||
)) !== null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Active Linker
|
||||
*
|
||||
@ -144,7 +166,7 @@ final class Linker
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$this->session->set('getbible_active_linker_guid', $linker);
|
||||
|
||||
return true;
|
||||
|
@ -100,6 +100,28 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a Linker is valid active linker
|
||||
*
|
||||
* @param string $linker The linker GUID value
|
||||
*
|
||||
* @return bool True if active valid linker
|
||||
* @since 2.0.1
|
||||
**/
|
||||
public function valid(string $linker): bool
|
||||
{
|
||||
// is only valid if this linker has an active password
|
||||
if (GuidHelper::valid($linker) && ($password_name = $this->load->value(
|
||||
['linker' => $linker, 'published' => 1],
|
||||
'name', 'password'
|
||||
)) !== null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Active Linker
|
||||
*
|
||||
@ -114,7 +136,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$this->session->set('getbible_active_linker_guid', $linker);
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user