public function hasSingleton($class, $checkInstance = false)
    {
        $class = $this->getAlias($class);

        return $checkInstance ? isset($this->_singletons[$class]) : array_key_exists($class, $this->_singletons);
    }