mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Add poll system for Patrons Circle
This commit is contained in:
parent
3555d53615
commit
2ef5ce6551
44 changed files with 717 additions and 98 deletions
|
@ -1,7 +1,7 @@
|
|||
<?
|
||||
use function Safe\substr;
|
||||
|
||||
abstract class PropertiesBase extends OrmBase{
|
||||
abstract class PropertiesBase{
|
||||
/**
|
||||
* @param mixed $var
|
||||
* @return mixed
|
||||
|
@ -12,6 +12,15 @@ abstract class PropertiesBase extends OrmBase{
|
|||
if(method_exists($this, $function)){
|
||||
return $this->$function();
|
||||
}
|
||||
elseif(property_exists($this, $var . 'Id') && method_exists($var, 'Get')){
|
||||
// If our object has an VarId attribute, and the Var class also has a ::Get method,
|
||||
// call it and return the result
|
||||
if($this->$var === null && $this->{$var . 'Id'} !== null){
|
||||
$this->$var = $var::Get($this->{$var . 'Id'});
|
||||
}
|
||||
|
||||
return $this->$var;
|
||||
}
|
||||
elseif(substr($var, 0, 7) == 'Display'){
|
||||
// If we're asked for a DisplayXXX property and the getter doesn't exist, format as escaped HTML.
|
||||
if($this->$var === null){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue