public function set($arg1 = null, $arg2 = null)
    {
        if (is_string($arg1) && $arg2 !== null) {

            // must be initialized
            $this->template->set($arg1, $arg2);

            return $this;
        }

        if ($arg2 !== null) {
            throw new Exception([
                'Second argument to set() can be only passed if the first one is a string',
                'arg1' => $arg1,
                'arg2' => $arg2,
            ]);
        }

        if (is_scalar($arg1)) {
            $this->content = $arg1;

            return $this;
        }

        if (is_array($arg1)) {
            if (isset($arg1[0])) {
                $this->content = $arg1[0];
            }
            $this->setDefaults($arg1);

            return $this;
        }

        throw new Exception([
            'Not sure what to do with argument',
            'this' => $this,
            'arg1' => $arg1,
            'arg2' => $arg2,
        ]);
    }