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, ...)
|
+ __construct(Load $load, Insert $insert, ...)
|
||||||
+ get() : ?string
|
+ get() : ?string
|
||||||
+ active(bool $setup = true) : ?string
|
+ active(bool $setup = true) : ?string
|
||||||
|
+ valid(string $linker) : bool
|
||||||
+ set(string $linker) : bool
|
+ set(string $linker) : bool
|
||||||
+ access(string $linker, string $pass, ...) : ?array
|
+ access(string $linker, string $pass, ...) : ?array
|
||||||
- hasAccess(string $linker, string $pass) : bool
|
- hasAccess(string $linker, string $pass) : bool
|
||||||
@ -53,14 +54,21 @@ note right of Linker::active
|
|||||||
return: ?string
|
return: ?string
|
||||||
end note
|
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
|
Set Active Linker
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Linker::access
|
note left of Linker::access
|
||||||
Set Access
|
Set Access
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
@ -72,35 +80,35 @@ note right of Linker::access
|
|||||||
?string $oldPass
|
?string $oldPass
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Linker::hasAccess
|
note right of Linker::hasAccess
|
||||||
Has Access
|
Has Access
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Linker::getPassGuid
|
note left of Linker::getPassGuid
|
||||||
Get Password GUID
|
Get Password GUID
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
return: ?string
|
return: ?string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Linker::getPassword
|
note right of Linker::getPassword
|
||||||
Get Password
|
Get Password
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
return: ?object
|
return: ?object
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Linker::setLinker
|
note left of Linker::setLinker
|
||||||
Set Linker
|
Set Linker
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Linker::setPassword
|
note right of Linker::setPassword
|
||||||
Set Password
|
Set Password
|
||||||
|
|
||||||
since: 2.0.1
|
since: 2.0.1
|
||||||
|
@ -130,6 +130,28 @@ final class Linker
|
|||||||
return null;
|
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
|
* Set Active Linker
|
||||||
*
|
*
|
||||||
@ -144,7 +166,7 @@ final class Linker
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session->set('getbible_active_linker_guid', $linker);
|
$this->session->set('getbible_active_linker_guid', $linker);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -100,6 +100,28 @@
|
|||||||
return null;
|
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
|
* Set Active Linker
|
||||||
*
|
*
|
||||||
@ -114,7 +136,7 @@
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session->set('getbible_active_linker_guid', $linker);
|
$this->session->set('getbible_active_linker_guid', $linker);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user