public function createClass($classname)
    {
        // Check for possible overwrite.
        if (isset($this->rewrite[$classname]) === true) {
            $classname = $this->rewrite[$classname];
        }

        return new $classname($this);
    }