/**
* Set a new http://schema.org Type
*
* @param string $type The $Type to be setup
*
* @return Microdata Instance of $this
*
* @since 3.2
*/
public function setType($type)
{
if (!$this->enabled) {
return $this;
}
// Sanitize the Type
$this->type = static::sanitizeType($type);
// If the given $Type isn't available, fallback to 'Thing' Type
if (!static::isTypeAvailable($this->type)) {
$this->type = 'Thing';
}
return $this;
}