/**
 * Get the registry.
 *
 * @return  Registry
 *
 * @since   4.0.0
 * @throws  \UnexpectedValueException May be thrown if the registry has not been set.
 */
public function getRegistry()
{
    if ($this->registry) {
        return $this->registry;
    }
    throw new \UnexpectedValueException('HTML registry not set in ' . __CLASS__);
}