Remove Metadatum::__call()

This commit is contained in:
Giuseppe Criscione 2019-05-24 20:27:56 +02:00
parent 9e1f9919b3
commit 551539aea3

View File

@ -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);
}
}