public function getParentModels($withNamespace = false)
    {
        $modelNameSpace = null;

        // first load parentModels
        if (!isset($parentModels)) {
            /** @var BaseModel $path */
            $config = $this->getDI()->get('config');
            $modelNameSpace = $config['namespaces']['models'];
            $path = $modelNameSpace . $this->getModelName();
            $parents = array();

            $currentParent = $path::$parentModel;

            while ($currentParent) :
                $parents[] = $currentParent;
                $path = $modelNameSpace . $currentParent;
                $currentParent = $path::$parentModel;
            endwhile;
            $this->parentModels = $parents;
        }

        if (count($this->parentModels) == 0) {
            return false;
        }

        // reset name space if it was not asked for
        if (!$withNamespace) {
            $modelNameSpace = null;
        }

        $parents = [];
        foreach ($this->parentModels as $parent) {
            $parents[] = $modelNameSpace . $parent;
        }

        return $parents;
    }