public function setClass($type, $cls)
    {
        if (!isset($this->cls[$type])) {
            throw new \InvalidArgumentException('Invalid type');
        }
        if (!is_string($cls)) {
            throw new \InvalidArgumentException(
                'Expected a string for the class'
            );
        }
        if (!class_exists($cls)) {
            throw new \InvalidArgumentException('Class not found');
        }
        if (!($cls instanceof \Erebot\Styling\VariableInterface)) {
            throw new \InvalidArgumentException(
                'Must be a subclass of \\Erebot\\Styling\\VariableInterface'
            );
        }
        $this->cls[$type] = $cls;
    }