mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-24 17:52:41 +01:00
Remove Metadatum::__call()
This commit is contained in:
parent
9e1f9919b3
commit
551539aea3
@ -43,6 +43,16 @@ class Metadatum
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return metadatum name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function name()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the metadatum is a charset declaration
|
||||
*
|
||||
@ -63,6 +73,26 @@ class Metadatum
|
||||
return in_array($this->name, self::HTTP_EQUIV_NAMES, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return metadatum content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function content()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return metadatum prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function prefix()
|
||||
{
|
||||
return $this->prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the metadatum has a prefix (e.g. 'twitter' for 'twitter:card', 'og' for 'og:image')
|
||||
*
|
||||
@ -72,12 +102,4 @@ class Metadatum
|
||||
{
|
||||
return !is_null($this->prefix);
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
return $this->$name;
|
||||
}
|
||||
throw new LogicException('Invalid method ' . static::class . '::' . $name);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user